fix(BpmnRules): update canConnectSequenceFlow()
This prevents multiple incoming sequence flows to target events of an event-based gateway when the connection source is not an event-based gateway.
This commit is contained in:
parent
867b41c04f
commit
b6e9c2186a
|
@ -826,6 +826,15 @@ function canConnectMessageFlow(source, target) {
|
|||
|
||||
function canConnectSequenceFlow(source, target) {
|
||||
|
||||
if (
|
||||
isEventBasedTarget(target) &&
|
||||
target.incoming.length > 0 &&
|
||||
areOutgoingEventBasedGatewayConnections(target.incoming) &&
|
||||
!is(source, 'bpmn:EventBasedGateway')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isSequenceFlowSource(source) &&
|
||||
isSequenceFlowTarget(target) &&
|
||||
isSameScope(source, target) &&
|
||||
|
@ -896,3 +905,17 @@ function canCopy(collection, element) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
function isOutgoingEventBasedGatewayConnection(connection) {
|
||||
|
||||
if (connection && connection.source) {
|
||||
return is(connection.source, 'bpmn:EventBasedGateway');
|
||||
}
|
||||
}
|
||||
|
||||
function areOutgoingEventBasedGatewayConnections(connections) {
|
||||
|
||||
connections = connections || [];
|
||||
|
||||
return connections.some(isOutgoingEventBasedGatewayConnection);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.0-dev">
|
||||
<bpmn:process id="Process_1" isExecutable="false">
|
||||
<bpmn:receiveTask id="ReceiveTask">
|
||||
<bpmn:incoming>SequenceFlow_A</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_05bjkc2</bpmn:outgoing>
|
||||
</bpmn:receiveTask>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Message">
|
||||
<bpmn:incoming>SequenceFlow_B</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_1l6c300</bpmn:outgoing>
|
||||
<bpmn:messageEventDefinition id="MessageEventDefinition_1xz8330" />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Timer">
|
||||
<bpmn:incoming>SequenceFlow_C</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_0ku3hwq</bpmn:outgoing>
|
||||
<bpmn:timerEventDefinition id="TimerEventDefinition_0h6dedo" />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Conditional">
|
||||
<bpmn:incoming>SequenceFlow_D</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_0yjtrc2</bpmn:outgoing>
|
||||
<bpmn:conditionalEventDefinition id="ConditionalEventDefinition_1eyek11">
|
||||
<bpmn:condition xsi:type="bpmn:tFormalExpression" />
|
||||
</bpmn:conditionalEventDefinition>
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Signal">
|
||||
<bpmn:incoming>SequenceFlow_E</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_12xris6</bpmn:outgoing>
|
||||
<bpmn:signalEventDefinition id="SignalEventDefinition_0bmjdpv" />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:endEvent id="EndEvent_1gytbom">
|
||||
<bpmn:incoming>SequenceFlow_05bjkc2</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:endEvent id="EndEvent_1s10cm7">
|
||||
<bpmn:incoming>SequenceFlow_1l6c300</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:endEvent id="EndEvent_1cjf8ky">
|
||||
<bpmn:incoming>SequenceFlow_0ku3hwq</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:endEvent id="EndEvent_0t9wzor">
|
||||
<bpmn:incoming>SequenceFlow_0yjtrc2</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:endEvent id="EndEvent_0k4zebg">
|
||||
<bpmn:incoming>SequenceFlow_12xris6</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:task id="Task_A">
|
||||
<bpmn:outgoing>SequenceFlow_A</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:task id="Task_B">
|
||||
<bpmn:outgoing>SequenceFlow_B</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:task id="Task_C">
|
||||
<bpmn:outgoing>SequenceFlow_C</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:task id="Task_D">
|
||||
<bpmn:outgoing>SequenceFlow_D</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:task id="Task_E">
|
||||
<bpmn:outgoing>SequenceFlow_E</bpmn:outgoing>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="SequenceFlow_05bjkc2" sourceRef="ReceiveTask" targetRef="EndEvent_1gytbom" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_1l6c300" sourceRef="IntermediateCatchEvent_Message" targetRef="EndEvent_1s10cm7" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_0ku3hwq" sourceRef="IntermediateCatchEvent_Timer" targetRef="EndEvent_1cjf8ky" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_0yjtrc2" sourceRef="IntermediateCatchEvent_Conditional" targetRef="EndEvent_0t9wzor" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_12xris6" sourceRef="IntermediateCatchEvent_Signal" targetRef="EndEvent_0k4zebg" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_A" sourceRef="Task_A" targetRef="ReceiveTask" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_B" sourceRef="Task_B" targetRef="IntermediateCatchEvent_Message" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_C" sourceRef="Task_C" targetRef="IntermediateCatchEvent_Timer" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_D" sourceRef="Task_D" targetRef="IntermediateCatchEvent_Conditional" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_E" sourceRef="Task_E" targetRef="IntermediateCatchEvent_Signal" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||
<bpmndi:BPMNShape id="ReceiveTask_1v6bvh5_di" bpmnElement="ReceiveTask">
|
||||
<dc:Bounds x="336" y="81" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_0xrbhjg_di" bpmnElement="IntermediateCatchEvent_Message">
|
||||
<dc:Bounds x="368" y="213" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_1wndrxs_di" bpmnElement="IntermediateCatchEvent_Timer">
|
||||
<dc:Bounds x="368" y="313" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_0k2sk19_di" bpmnElement="IntermediateCatchEvent_Conditional">
|
||||
<dc:Bounds x="368" y="423" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_1ihnoj3_di" bpmnElement="IntermediateCatchEvent_Signal">
|
||||
<dc:Bounds x="368" y="533" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_1gytbom_di" bpmnElement="EndEvent_1gytbom">
|
||||
<dc:Bounds x="486" y="103" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_1s10cm7_di" bpmnElement="EndEvent_1s10cm7">
|
||||
<dc:Bounds x="486" y="213" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_1cjf8ky_di" bpmnElement="EndEvent_1cjf8ky">
|
||||
<dc:Bounds x="486" y="313" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_0t9wzor_di" bpmnElement="EndEvent_0t9wzor">
|
||||
<dc:Bounds x="486" y="423" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="EndEvent_0k4zebg_di" bpmnElement="EndEvent_0k4zebg">
|
||||
<dc:Bounds x="486" y="533" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_1831vfx_di" bpmnElement="Task_A">
|
||||
<dc:Bounds x="156" y="81" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_0zhy9co_di" bpmnElement="Task_B">
|
||||
<dc:Bounds x="156" y="191" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_1i41gxo_di" bpmnElement="Task_C">
|
||||
<dc:Bounds x="156" y="291" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_1qthskw_di" bpmnElement="Task_D">
|
||||
<dc:Bounds x="156" y="401" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_1f0jmew_di" bpmnElement="Task_E">
|
||||
<dc:Bounds x="156" y="511" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_05bjkc2_di" bpmnElement="SequenceFlow_05bjkc2">
|
||||
<di:waypoint x="436" y="121" />
|
||||
<di:waypoint x="486" y="121" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1l6c300_di" bpmnElement="SequenceFlow_1l6c300">
|
||||
<di:waypoint x="404" y="231" />
|
||||
<di:waypoint x="486" y="231" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_0ku3hwq_di" bpmnElement="SequenceFlow_0ku3hwq">
|
||||
<di:waypoint x="404" y="331" />
|
||||
<di:waypoint x="486" y="331" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_0yjtrc2_di" bpmnElement="SequenceFlow_0yjtrc2">
|
||||
<di:waypoint x="404" y="441" />
|
||||
<di:waypoint x="486" y="441" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_12xris6_di" bpmnElement="SequenceFlow_12xris6">
|
||||
<di:waypoint x="404" y="551" />
|
||||
<di:waypoint x="486" y="551" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1nqkc2f_di" bpmnElement="SequenceFlow_A">
|
||||
<di:waypoint x="256" y="121" />
|
||||
<di:waypoint x="336" y="121" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_13d84ey_di" bpmnElement="SequenceFlow_B">
|
||||
<di:waypoint x="256" y="231" />
|
||||
<di:waypoint x="368" y="231" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_17wwzat_di" bpmnElement="SequenceFlow_C">
|
||||
<di:waypoint x="256" y="331" />
|
||||
<di:waypoint x="368" y="331" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1r2eh3g_di" bpmnElement="SequenceFlow_D">
|
||||
<di:waypoint x="256" y="441" />
|
||||
<di:waypoint x="368" y="441" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_197dyvg_di" bpmnElement="SequenceFlow_E">
|
||||
<di:waypoint x="256" y="551" />
|
||||
<di:waypoint x="368" y="551" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
|
@ -176,6 +176,50 @@ describe('features/modeling - move elements', function() {
|
|||
});
|
||||
|
||||
|
||||
describe('incoming sequence flows of event based targets', function() {
|
||||
|
||||
var diagramXML = require('./MoveElements.eventBasedTargets.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(diagramXML, {
|
||||
modules: [
|
||||
coreModule,
|
||||
modelingModule
|
||||
]
|
||||
}));
|
||||
|
||||
it('should keep when moving source flow object', inject(function(elementRegistry, modeling) {
|
||||
|
||||
// given
|
||||
var shapeTask_A = elementRegistry.get('Task_A'),
|
||||
shapeTask_B = elementRegistry.get('Task_B'),
|
||||
shapeTask_C = elementRegistry.get('Task_C'),
|
||||
shapeTask_D = elementRegistry.get('Task_D'),
|
||||
shapeTask_E = elementRegistry.get('Task_E'),
|
||||
connectionSequenceFlow_A = elementRegistry.get('SequenceFlow_A'),
|
||||
connectionSequenceFlow_B = elementRegistry.get('SequenceFlow_B'),
|
||||
connectionSequenceFlow_C = elementRegistry.get('SequenceFlow_C'),
|
||||
connectionSequenceFlow_D = elementRegistry.get('SequenceFlow_D'),
|
||||
connectionSequenceFlow_E = elementRegistry.get('SequenceFlow_E');
|
||||
|
||||
// when
|
||||
modeling.moveElements([
|
||||
shapeTask_A,
|
||||
shapeTask_B,
|
||||
shapeTask_C,
|
||||
shapeTask_D,
|
||||
shapeTask_E
|
||||
], {
|
||||
x: 0, y: -50
|
||||
});
|
||||
|
||||
// then
|
||||
expect(elementRegistry.get(connectionSequenceFlow_A.id)).to.exist;
|
||||
expect(elementRegistry.get(connectionSequenceFlow_B.id)).to.exist;
|
||||
expect(elementRegistry.get(connectionSequenceFlow_C.id)).to.exist;
|
||||
expect(elementRegistry.get(connectionSequenceFlow_D.id)).to.exist;
|
||||
expect(elementRegistry.get(connectionSequenceFlow_E.id)).to.exist;
|
||||
}));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@ -203,4 +247,4 @@ function moveWaypoints(waypoints, delta) {
|
|||
|
||||
return moved;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_02szeau" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.0-dev">
|
||||
<bpmn:process id="Process_0k6bq6y" isExecutable="true">
|
||||
<bpmn:receiveTask id="ReceiveTask">
|
||||
<bpmn:incoming>SequenceFlow_05gxk75</bpmn:incoming>
|
||||
<bpmn:outgoing>SequenceFlow_1kmrm2q</bpmn:outgoing>
|
||||
</bpmn:receiveTask>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Message">
|
||||
<bpmn:incoming>SequenceFlow_1nbhymt</bpmn:incoming>
|
||||
<bpmn:messageEventDefinition />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Timer">
|
||||
<bpmn:incoming>SequenceFlow_1xmlemi</bpmn:incoming>
|
||||
<bpmn:timerEventDefinition />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Condition">
|
||||
<bpmn:incoming>SequenceFlow_0ql3yq7</bpmn:incoming>
|
||||
<bpmn:conditionalEventDefinition>
|
||||
<bpmn:condition xsi:type="bpmn:tFormalExpression" />
|
||||
</bpmn:conditionalEventDefinition>
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_Signal">
|
||||
<bpmn:incoming>SequenceFlow_08ei3b0</bpmn:incoming>
|
||||
<bpmn:signalEventDefinition />
|
||||
</bpmn:intermediateCatchEvent>
|
||||
<bpmn:task id="Task">
|
||||
<bpmn:incoming>SequenceFlow_1kmrm2q</bpmn:incoming>
|
||||
</bpmn:task>
|
||||
<bpmn:sequenceFlow id="SequenceFlow_1kmrm2q" sourceRef="ReceiveTask" targetRef="Task" />
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway">
|
||||
<bpmn:outgoing>SequenceFlow_08ei3b0</bpmn:outgoing>
|
||||
<bpmn:outgoing>SequenceFlow_0ql3yq7</bpmn:outgoing>
|
||||
<bpmn:outgoing>SequenceFlow_1xmlemi</bpmn:outgoing>
|
||||
<bpmn:outgoing>SequenceFlow_1nbhymt</bpmn:outgoing>
|
||||
<bpmn:outgoing>SequenceFlow_05gxk75</bpmn:outgoing>
|
||||
</bpmn:eventBasedGateway>
|
||||
<bpmn:sequenceFlow id="SequenceFlow_08ei3b0" sourceRef="EventBasedGateway" targetRef="IntermediateCatchEvent_Signal" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_0ql3yq7" sourceRef="EventBasedGateway" targetRef="IntermediateCatchEvent_Condition" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_1xmlemi" sourceRef="EventBasedGateway" targetRef="IntermediateCatchEvent_Timer" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_1nbhymt" sourceRef="EventBasedGateway" targetRef="IntermediateCatchEvent_Message" />
|
||||
<bpmn:sequenceFlow id="SequenceFlow_05gxk75" sourceRef="EventBasedGateway" targetRef="ReceiveTask" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0k6bq6y">
|
||||
<bpmndi:BPMNShape id="ReceiveTask_10j94my_di" bpmnElement="ReceiveTask">
|
||||
<dc:Bounds x="305" y="81" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_08mwvkn_di" bpmnElement="IntermediateCatchEvent_Message">
|
||||
<dc:Bounds x="305" y="213" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_1hnwerk_di" bpmnElement="IntermediateCatchEvent_Timer">
|
||||
<dc:Bounds x="305" y="323" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_0if7i76_di" bpmnElement="IntermediateCatchEvent_Condition">
|
||||
<dc:Bounds x="305" y="433" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="IntermediateCatchEvent_0vjmn7z_di" bpmnElement="IntermediateCatchEvent_Signal">
|
||||
<dc:Bounds x="305" y="543" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Task_0q0ve00_di" bpmnElement="Task">
|
||||
<dc:Bounds x="455" y="81" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1kmrm2q_di" bpmnElement="SequenceFlow_1kmrm2q">
|
||||
<di:waypoint x="405" y="121" />
|
||||
<di:waypoint x="455" y="121" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="EventBasedGateway_13tn33b_di" bpmnElement="EventBasedGateway">
|
||||
<dc:Bounds x="205" y="96" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_08ei3b0_di" bpmnElement="SequenceFlow_08ei3b0">
|
||||
<di:waypoint x="230" y="146" />
|
||||
<di:waypoint x="230" y="561" />
|
||||
<di:waypoint x="305" y="561" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_0ql3yq7_di" bpmnElement="SequenceFlow_0ql3yq7">
|
||||
<di:waypoint x="230" y="146" />
|
||||
<di:waypoint x="230" y="451" />
|
||||
<di:waypoint x="305" y="451" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1xmlemi_di" bpmnElement="SequenceFlow_1xmlemi">
|
||||
<di:waypoint x="230" y="146" />
|
||||
<di:waypoint x="230" y="341" />
|
||||
<di:waypoint x="305" y="341" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_1nbhymt_di" bpmnElement="SequenceFlow_1nbhymt">
|
||||
<di:waypoint x="230" y="146" />
|
||||
<di:waypoint x="230" y="231" />
|
||||
<di:waypoint x="305" y="231" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="SequenceFlow_05gxk75_di" bpmnElement="SequenceFlow_05gxk75">
|
||||
<di:waypoint x="255" y="121" />
|
||||
<di:waypoint x="305" y="121" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
|
@ -475,131 +475,195 @@ describe('features/modeling/rules - BpmnRules', function() {
|
|||
|
||||
describe('event based gateway', function() {
|
||||
|
||||
var testXML = require('./BpmnRules.eventBasedGateway.bpmn');
|
||||
describe('EventBasedGateway -> EventBasedGateway targets', function() {
|
||||
|
||||
beforeEach(bootstrapModeler(testXML, { modules: testModules }));
|
||||
var testXML = require('./BpmnRules.eventBasedGatewayBasic.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(testXML, { modules: testModules }));
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Message', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Message', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Message', inject(function() {
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Message', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Message', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Message', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Signal', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Signal', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Condition', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Condition', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Timer', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Timer', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateThrowEvent_Message', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateThrowEvent_Message', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ReceiveTask', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ReceiveTask', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> Task_None', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'Task_None', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ParallelGateway', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ParallelGateway', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ParallelGateway', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ParallelGateway', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
describe('Task -> EventBasedGateway target with incoming sequence flow', function() {
|
||||
|
||||
var testXML = require('./BpmnRules.eventBasedGatewayConfiguration.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(testXML, { modules: testModules }));
|
||||
|
||||
it('connect Task -> ReceiveTask', function() {
|
||||
|
||||
expectCanConnect('Task', 'ReceiveTask', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Message', inject(function() {
|
||||
it('connect Task -> IntermediateCatchEvent_Message', function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Message', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
expectCanConnect('Task', 'IntermediateCatchEvent_Message', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Signal', inject(function() {
|
||||
it('connect Task -> IntermediateCatchEvent_Timer', function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Signal', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
expectCanConnect('Task', 'IntermediateCatchEvent_Timer', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Condition', inject(function() {
|
||||
it('connect Task -> IntermediateCatchEvent_Condition', function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Condition', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
expectCanConnect('Task', 'IntermediateCatchEvent_Condition', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent_Timer', inject(function() {
|
||||
it('connect Task -> IntermediateCatchEvent_Signal', function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent_Timer', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
expectCanConnect('Task', 'IntermediateCatchEvent_Signal', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateCatchEvent', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateCatchEvent', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> IntermediateThrowEvent_Message', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'IntermediateThrowEvent_Message', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ReceiveTask', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ReceiveTask', {
|
||||
sequenceFlow: true,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> Task_None', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'Task_None', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ParallelGateway', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ParallelGateway', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
it('connect EventBasedGateway -> ParallelGateway', inject(function() {
|
||||
|
||||
expectCanConnect('EventBasedGateway', 'ParallelGateway', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: false,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
}));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue