Skip to content

Commit b290078

Browse files
ssoorriiinphilippfromme
authored andcommitted
fix(modeling): do not remove sequence flow condition on type change
* do not remove sequence flow condition when changing type to intermediate catch Closes #1199
1 parent 2e80209 commit b290078

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

lib/features/modeling/BpmnUpdater.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import {
1919
is
2020
} from '../../util/ModelUtil';
2121

22+
import {
23+
isAny
24+
} from './util/ModelingUtil';
25+
2226
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
2327

2428
/**
@@ -248,10 +252,13 @@ export default function BpmnUpdater(
248252

249253
// on reconnectEnd -> conditional flow
250254
if (oldTarget && (businessObject.conditionExpression) &&
251-
!(is(newTarget, 'bpmn:Activity') ||
252-
is(newTarget, 'bpmn:EndEvent') ||
253-
is(newTarget, 'bpmn:Gateway') ||
254-
is(newTarget, 'bpmn:IntermediateThrowEvent'))) {
255+
!isAny(newTarget, [
256+
'bpmn:Activity',
257+
'bpmn:EndEvent',
258+
'bpmn:Gateway',
259+
'bpmn:IntermediateThrowEvent',
260+
'bpmn:IntermediateCatchEvent'
261+
])) {
255262
context.conditionExpression = businessObject.conditionExpression;
256263
businessObject.conditionExpression = undefined;
257264
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,8 @@ describe('features/popup-menu - replace menu provider', function() {
18171817
[
18181818
'bpmn:Activity',
18191819
'bpmn:EndEvent',
1820-
'bpmn:IntermediateThrowEvent'
1820+
'bpmn:IntermediateThrowEvent',
1821+
'bpmn:IntermediateCatchEvent'
18211822
].forEach(function(type) {
18221823

18231824
it('should keep ConditionalFlow when changing target to ' + type,

0 commit comments

Comments
 (0)