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 // on reconnectEnd -> default flow
if ((businessObject.sourceRef && businessObject.sourceRef.default) && if ((businessObject.sourceRef && businessObject.sourceRef.default) &&
!(is(newTarget, 'bpmn:Activity') || !isAny(newTarget, [
is(newTarget, 'bpmn:EndEvent') || 'bpmn:Activity',
is(newTarget, 'bpmn:Gateway') || 'bpmn:EndEvent',
is(newTarget, 'bpmn:IntermediateThrowEvent'))) { 'bpmn:Gateway',
'bpmn:IntermediateThrowEvent',
'bpmn:IntermediateCatchEvent'
])) {
context.default = businessObject.sourceRef.default; context.default = businessObject.sourceRef.default;
businessObject.sourceRef.default = undefined; businessObject.sourceRef.default = undefined;
} }

View File

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