Show pageOld revisionsBacklinksCopy this pageBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Make parallel split explicit ====== {{tag>parallel_gateway sequence_flow}} Avoid multiple sequence flows outgoing from an activity or event. ===== ✔ How to ===== <bpmnio type="bpmn"> <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1"> <process id="Process_03hlcwi"> <parallelGateway id="Gateway_0t7s84v"> <incoming>Flow_02mmgfl</incoming> <outgoing>Flow_1fsucrx</outgoing> <outgoing>Flow_12ytfbn</outgoing> </parallelGateway> <task id="Activity_15pqard" name="Do this"> <incoming>Flow_1fsucrx</incoming> </task> <sequenceFlow id="Flow_1fsucrx" sourceRef="Gateway_0t7s84v" targetRef="Activity_15pqard" /> <task id="Activity_1gfp408" name="Do that"> <incoming>Flow_12ytfbn</incoming> </task> <sequenceFlow id="Flow_12ytfbn" sourceRef="Gateway_0t7s84v" targetRef="Activity_1gfp408" /> <task id="Activity_0zqkrvj" name=""> <outgoing>Flow_02mmgfl</outgoing> </task> <sequenceFlow id="Flow_02mmgfl" sourceRef="Activity_0zqkrvj" targetRef="Gateway_0t7s84v" /> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_03hlcwi"> <bpmndi:BPMNShape id="Gateway_150pa8t_di" bpmnElement="Gateway_0t7s84v"> <omgdc:Bounds x="265" y="115" width="50" height="50" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0zqkrvj_di" bpmnElement="Activity_0zqkrvj"> <omgdc:Bounds x="120" y="100" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_15pqard_di" bpmnElement="Activity_15pqard"> <omgdc:Bounds x="350" y="20" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_1gfp408_di" bpmnElement="Activity_1gfp408"> <omgdc:Bounds x="350" y="180" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_1fsucrx_di" bpmnElement="Flow_1fsucrx"> <omgdi:waypoint x="290" y="115" /> <omgdi:waypoint x="290" y="60" /> <omgdi:waypoint x="350" y="60" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_12ytfbn_di" bpmnElement="Flow_12ytfbn"> <omgdi:waypoint x="290" y="165" /> <omgdi:waypoint x="290" y="220" /> <omgdi:waypoint x="350" y="220" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_02mmgfl_di" bpmnElement="Flow_02mmgfl"> <omgdi:waypoint x="220" y="140" /> <omgdi:waypoint x="265" y="140" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> ===== ✘ How NOT to ===== According to [[https://www.omg.org/spec/BPMN/2.0.2/PDF | BPMN spec]], the process depicted below does exactly what the "to do" process does: both are executed in parallel. The difference is this: parallel exectution is explicit in the diagram above and implicit in the diagram below. The explicit way should be preferred indeed. <bpmnio type="bpmn"> <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1"> <process id="Process_03hlcwi"> <task id="Activity_15pqard" name="Do this"> <incoming>Flow_1fsucrx</incoming> </task> <sequenceFlow id="Flow_1fsucrx" sourceRef="Activity_0zqkrvj" targetRef="Activity_15pqard" /> <task id="Activity_1gfp408" name="Do that"> <incoming>Flow_12ytfbn</incoming> </task> <sequenceFlow id="Flow_12ytfbn" sourceRef="Activity_0zqkrvj" targetRef="Activity_1gfp408" /> <task id="Activity_0zqkrvj" name=""> <outgoing>Flow_1fsucrx</outgoing> <outgoing>Flow_12ytfbn</outgoing> </task> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_03hlcwi"> <bpmndi:BPMNShape id="Activity_15pqard_di" bpmnElement="Activity_15pqard"> <omgdc:Bounds x="380" y="20" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_1gfp408_di" bpmnElement="Activity_1gfp408"> <omgdc:Bounds x="380" y="180" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0zqkrvj_di" bpmnElement="Activity_0zqkrvj"> <omgdc:Bounds x="240" y="100" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_1fsucrx_di" bpmnElement="Flow_1fsucrx"> <omgdi:waypoint x="290" y="100" /> <omgdi:waypoint x="290" y="60" /> <omgdi:waypoint x="380" y="60" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_12ytfbn_di" bpmnElement="Flow_12ytfbn"> <omgdi:waypoint x="290" y="180" /> <omgdi:waypoint x="290" y="220" /> <omgdi:waypoint x="380" y="220" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> The sequence flows at the diagram below are labelled ("if this", "if that"), so naive user may think that there are two exclusive options. Yet it's still the same implicit parallel execution. <bpmnio type="bpmn"> <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="sid-38422fae-e03e-43a3-bef4-bd33b32041b2" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1"> <process id="Process_03hlcwi"> <task id="Activity_15pqard" name="Do this"> <incoming>Flow_1fsucrx</incoming> </task> <sequenceFlow id="Flow_1fsucrx" name="if this" sourceRef="Activity_0zqkrvj" targetRef="Activity_15pqard" /> <task id="Activity_1gfp408" name="Do that"> <incoming>Flow_12ytfbn</incoming> </task> <sequenceFlow id="Flow_12ytfbn" name="if that" sourceRef="Activity_0zqkrvj" targetRef="Activity_1gfp408" /> <task id="Activity_0zqkrvj" name=""> <outgoing>Flow_12ytfbn</outgoing> <outgoing>Flow_1fsucrx</outgoing> </task> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_03hlcwi"> <bpmndi:BPMNShape id="Activity_15pqard_di" bpmnElement="Activity_15pqard"> <omgdc:Bounds x="380" y="20" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_1gfp408_di" bpmnElement="Activity_1gfp408"> <omgdc:Bounds x="380" y="180" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0zqkrvj_di" bpmnElement="Activity_0zqkrvj"> <omgdc:Bounds x="240" y="100" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_1fsucrx_di" bpmnElement="Flow_1fsucrx"> <omgdi:waypoint x="290" y="100" /> <omgdi:waypoint x="290" y="60" /> <omgdi:waypoint x="380" y="60" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="292" y="77" width="26" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_12ytfbn_di" bpmnElement="Flow_12ytfbn"> <omgdi:waypoint x="290" y="180" /> <omgdi:waypoint x="290" y="220" /> <omgdi:waypoint x="380" y="220" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="291" y="197" width="28" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> ===== Notes ===== * Although several outgoing flows are allowed by [[https://www.omg.org/spec/BPMN/2.0.2/PDF | BPMN spec]], it's potentially confusing and therefore should be considered bad practice. * It's sometimes argued that implicit parallel execution saves one element (the parallel gateway) and hence makes the diagram simpler. This argument is hardly acceptable because the parallel gateway adds value to the diagram by making process execution logic clear. ===== Exceptions ===== * Implicit parallel flows are acceptable at the start event in [[en:rule:control_branch#Notes | control branch ]] technique. ===== See also ===== * [[explicit_parallel_merge]] * [[do_not_use_conditional_flows]] * [[do_not_save_on_gateways]] ===== Автор(ы) ===== --- //[[user:bell|Anatoly Belaychuk]] 2023-09-10 13:02// Last modified: 2024-08-24 16:44(external edit)