Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -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)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down