Skip to content

Commit 37bcd07

Browse files
ssoorriiinphilippfromme
authored andcommitted
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
1 parent b290078 commit 37bcd07

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/features/modeling/BpmnUpdater.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,13 @@ export default function BpmnUpdater(
234234

235235
// on reconnectEnd -> default flow
236236
if ((businessObject.sourceRef && businessObject.sourceRef.default) &&
237-
!(is(newTarget, 'bpmn:Activity') ||
238-
is(newTarget, 'bpmn:EndEvent') ||
239-
is(newTarget, 'bpmn:Gateway') ||
240-
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
237+
!isAny(newTarget, [
238+
'bpmn:Activity',
239+
'bpmn:EndEvent',
240+
'bpmn:Gateway',
241+
'bpmn:IntermediateThrowEvent',
242+
'bpmn:IntermediateCatchEvent'
243+
])) {
241244
context.default = businessObject.sourceRef.default;
242245
businessObject.sourceRef.default = undefined;
243246
}

test/spec/features/popup-menu/ReplaceMenuProviderSpec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,8 @@ describe('features/popup-menu - replace menu provider', function() {
14591459
[
14601460
'bpmn:Activity',
14611461
'bpmn:EndEvent',
1462-
'bpmn:IntermediateThrowEvent'
1462+
'bpmn:IntermediateThrowEvent',
1463+
'bpmn:IntermediateCatchEvent'
14631464
].forEach(function(type) {
14641465

14651466
it('should keep DefaultFlow when changing target to ' + type,

0 commit comments

Comments
 (0)