fix(rules): allow message boundary event as message flow target
Closes #1346 Related to camunda/camunda-modeler#1919
This commit is contained in:
parent
36e4f6113c
commit
a9ce32449a
|
@ -281,12 +281,14 @@ function isMessageFlowSource(element) {
|
|||
function isMessageFlowTarget(element) {
|
||||
return (
|
||||
is(element, 'bpmn:InteractionNode') &&
|
||||
!is(element, 'bpmn:BoundaryEvent') &&
|
||||
!isForCompensation(element) && (
|
||||
!is(element, 'bpmn:Event') || (
|
||||
is(element, 'bpmn:CatchEvent') &&
|
||||
hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition')
|
||||
)
|
||||
) && !(
|
||||
is(element, 'bpmn:BoundaryEvent') &&
|
||||
!hasEventDefinition(element, 'bpmn:MessageEventDefinition')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
<bpmn:boundaryEvent id="BoundaryEvent_on_Task" attachedToRef="Task" />
|
||||
<bpmn:startEvent id="StartEvent_None" />
|
||||
<bpmn:exclusiveGateway id="ExclusiveGateway" />
|
||||
<bpmn:boundaryEvent id="MessageBoundaryEvent_onSubProcess" attachedToRef="SubProcess">
|
||||
<bpmn:messageEventDefinition id="MessageEventDefinition_1owasie" />
|
||||
</bpmn:boundaryEvent>
|
||||
</bpmn:process>
|
||||
<bpmn:process id="OtherProcess">
|
||||
<bpmn:task id="Task_in_OtherProcess" name="3" />
|
||||
|
@ -88,6 +91,9 @@
|
|||
<dc:Bounds x="474" y="275" width="90" height="20" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="MessageBoundaryEvent_onSubProcess_di" bpmnElement="MessageBoundaryEvent_onSubProcess">
|
||||
<dc:Bounds x="362" y="204" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
|
|
|
@ -663,6 +663,17 @@ describe('features/modeling/rules - BpmnRules', function() {
|
|||
}));
|
||||
|
||||
|
||||
it('connect Task_in_OtherProcess -> MessageBoundaryEvent_onSubProcess', inject(function() {
|
||||
|
||||
expectCanConnect('Task_in_OtherProcess', 'MessageBoundaryEvent_onSubProcess', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: true,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('drop BoundaryEvent -> Task', function() {
|
||||
expectCanDrop('BoundaryEvent_on_SubProcess', 'Task_in_OtherProcess', false);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue