Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default start event for ad-hoc subprocess #2295

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ export default function SubProcessStartEventBehavior(injector, modeling) {

if (
!is(newShape, 'bpmn:SubProcess') ||
is(newShape,'bpmn:AdHocSubProcess') ||
! (is(oldShape, 'bpmn:Task') || is(oldShape, 'bpmn:CallActivity')) ||
!isExpanded(newShape)
) {
Original file line number Diff line number Diff line change
@@ -74,6 +74,30 @@ describe('features/modeling/behavior - subprocess start event', function() {
});


describe('task -> adhoc subprocess', function() {

it('should NOT add start event child to adhoc subprocess', inject(
function(elementRegistry, bpmnReplace) {

// given
var task = elementRegistry.get('Task_1'),
collapsedSubProcess,
startEvents;

// when
collapsedSubProcess = bpmnReplace.replaceElement(task, {
type: 'bpmn:AdHocSubProcess',
isExpanded: true
});

// then
startEvents = getChildStartEvents(collapsedSubProcess);

expect(startEvents).to.have.length(0);
}));
});


describe('task -> collapsed subprocess', function() {

it('should NOT add start event child to subprocess', inject(