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
This commit is contained in:
parent
2e80209820
commit
b290078600
|
@ -19,6 +19,10 @@ import {
|
||||||
is
|
is
|
||||||
} from '../../util/ModelUtil';
|
} from '../../util/ModelUtil';
|
||||||
|
|
||||||
|
import {
|
||||||
|
isAny
|
||||||
|
} from './util/ModelingUtil';
|
||||||
|
|
||||||
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -248,10 +252,13 @@ export default function BpmnUpdater(
|
||||||
|
|
||||||
// on reconnectEnd -> conditional flow
|
// on reconnectEnd -> conditional flow
|
||||||
if (oldTarget && (businessObject.conditionExpression) &&
|
if (oldTarget && (businessObject.conditionExpression) &&
|
||||||
!(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.conditionExpression = businessObject.conditionExpression;
|
context.conditionExpression = businessObject.conditionExpression;
|
||||||
businessObject.conditionExpression = undefined;
|
businessObject.conditionExpression = undefined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1817,7 +1817,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 ConditionalFlow when changing target to ' + type,
|
it('should keep ConditionalFlow when changing target to ' + type,
|
||||||
|
|
Loading…
Reference in New Issue