fix(modeling): do not remove default sequence flow on type change

* do not remove default sequence flow when changing type to intermediate catch

Closes #1197
This commit is contained in:
ssoorriiin 2019-09-24 23:10:09 +03:00 committed by Philipp Fromme
parent b290078600
commit 37bcd070e8
2 changed files with 9 additions and 5 deletions

View File

@ -234,10 +234,13 @@ export default function BpmnUpdater(
// on reconnectEnd -> default flow
if ((businessObject.sourceRef && businessObject.sourceRef.default) &&
!(is(newTarget, 'bpmn:Activity') ||
is(newTarget, 'bpmn:EndEvent') ||
is(newTarget, 'bpmn:Gateway') ||
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
!isAny(newTarget, [
'bpmn:Activity',
'bpmn:EndEvent',
'bpmn:Gateway',
'bpmn:IntermediateThrowEvent',
'bpmn:IntermediateCatchEvent'
])) {
context.default = businessObject.sourceRef.default;
businessObject.sourceRef.default = undefined;
}

View File

@ -1459,7 +1459,8 @@ describe('features/popup-menu - replace menu provider', function() {
[
'bpmn:Activity',
'bpmn:EndEvent',
'bpmn:IntermediateThrowEvent'
'bpmn:IntermediateThrowEvent',
'bpmn:IntermediateCatchEvent'
].forEach(function(type) {
it('should keep DefaultFlow when changing target to ' + type,