Both sides previous revision Previous revision Next revision | Previous revision |
en:rule:do_not_use_conditional_flows [2024-01-08 16:51] – Anatoly Belaychuk | en:rule:do_not_use_conditional_flows [2024-02-07 11:45] (current) – [Notes] Anatoly Belaychuk |
---|
====== 0DRAFT Don't use conditional flows ====== | ====== Don't use "flows with diamonds" ====== |
| |
{{tag>gateway}} | {{tag>gateway flow conditional_flow}} |
| |
{{en:underconstruction.png?nolink&200|}} | Avoid conditional flows outgoing from activities, use gateways instead. |
| |
Avoid conditional flows, use gateways instead. | |
| |
===== ✔ How to ===== | ===== ✔ How to ===== |
<process id="Process_1vz64lo"> | <process id="Process_1vz64lo"> |
<task id="Activity_0131ilb"> | <task id="Activity_0131ilb"> |
<outgoing>Flow_04is4m4</outgoing> | <outgoing>Flow_1em6o86</outgoing> |
<outgoing>Flow_02u49rt</outgoing> | |
</task> | </task> |
<task id="Activity_0317o28" name="Do this"> | <task id="Activity_0317o28" name="Do this"> |
<incoming>Flow_04is4m4</incoming> | <incoming>Flow_04is4m4</incoming> |
</task> | </task> |
<sequenceFlow id="Flow_04is4m4" name="if this" sourceRef="Activity_0131ilb" targetRef="Activity_0317o28"> | <sequenceFlow id="Flow_04is4m4" name="if this" sourceRef="Gateway_0gn9r9q" targetRef="Activity_0317o28" /> |
<conditionExpression xsi:type="tFormalExpression"></conditionExpression> | |
</sequenceFlow> | |
<task id="Activity_0fkgdc1" name="Do that"> | <task id="Activity_0fkgdc1" name="Do that"> |
<incoming>Flow_02u49rt</incoming> | <incoming>Flow_02u49rt</incoming> |
</task> | </task> |
<sequenceFlow id="Flow_02u49rt" name="if that" sourceRef="Activity_0131ilb" targetRef="Activity_0fkgdc1"> | <sequenceFlow id="Flow_02u49rt" name="if that" sourceRef="Gateway_0gn9r9q" targetRef="Activity_0fkgdc1" /> |
<conditionExpression xsi:type="tFormalExpression"></conditionExpression> | <sequenceFlow id="Flow_1em6o86" sourceRef="Activity_0131ilb" targetRef="Gateway_0gn9r9q" /> |
</sequenceFlow> | <inclusiveGateway id="Gateway_0gn9r9q"> |
| <incoming>Flow_1em6o86</incoming> |
| <outgoing>Flow_02u49rt</outgoing> |
| <outgoing>Flow_04is4m4</outgoing> |
| </inclusiveGateway> |
</process> | </process> |
<bpmndi:BPMNDiagram id="BpmnDiagram_1"> | <bpmndi:BPMNDiagram id="BpmnDiagram_1"> |
<omgdc:Bounds x="260" y="150" width="100" height="80" /> | <omgdc:Bounds x="260" y="150" width="100" height="80" /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Activity_0317o28_di" bpmnElement="Activity_0317o28"> | <bpmndi:BPMNShape id="Gateway_0wcaf75_di" bpmnElement="Gateway_0gn9r9q"> |
<omgdc:Bounds x="390" y="60" width="100" height="80" /> | <omgdc:Bounds x="415" y="165" width="50" height="50" /> |
<bpmndi:BPMNLabel /> | |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Activity_0fkgdc1_di" bpmnElement="Activity_0fkgdc1"> | <bpmndi:BPMNShape id="Activity_0fkgdc1_di" bpmnElement="Activity_0fkgdc1"> |
<omgdc:Bounds x="390" y="240" width="100" height="80" /> | <omgdc:Bounds x="390" y="260" width="100" height="80" /> |
| <bpmndi:BPMNLabel /> |
| </bpmndi:BPMNShape> |
| <bpmndi:BPMNShape id="Activity_0317o28_di" bpmnElement="Activity_0317o28"> |
| <omgdc:Bounds x="390" y="40" width="100" height="80" /> |
<bpmndi:BPMNLabel /> | <bpmndi:BPMNLabel /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNEdge id="Flow_04is4m4_di" bpmnElement="Flow_04is4m4"> | <bpmndi:BPMNEdge id="Flow_04is4m4_di" bpmnElement="Flow_04is4m4"> |
<omgdi:waypoint x="310" y="150" /> | <omgdi:waypoint x="440" y="165" /> |
<omgdi:waypoint x="310" y="100" /> | <omgdi:waypoint x="440" y="120" /> |
<omgdi:waypoint x="390" y="100" /> | |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="326" y="103" width="27" height="14" /> | <omgdc:Bounds x="446" y="142" width="27" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_02u49rt_di" bpmnElement="Flow_02u49rt"> | <bpmndi:BPMNEdge id="Flow_02u49rt_di" bpmnElement="Flow_02u49rt"> |
<omgdi:waypoint x="310" y="230" /> | <omgdi:waypoint x="440" y="215" /> |
<omgdi:waypoint x="310" y="280" /> | <omgdi:waypoint x="440" y="260" /> |
<omgdi:waypoint x="390" y="280" /> | |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="326" y="263" width="28" height="14" /> | <omgdc:Bounds x="446" y="224" width="28" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
| </bpmndi:BPMNEdge> |
| <bpmndi:BPMNEdge id="Flow_1em6o86_di" bpmnElement="Flow_1em6o86"> |
| <omgdi:waypoint x="360" y="190" /> |
| <omgdi:waypoint x="415" y="190" /> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
</bpmndi:BPMNPlane> | </bpmndi:BPMNPlane> |
</task> | </task> |
<sequenceFlow id="Flow_04is4m4" name="if this" sourceRef="Activity_0131ilb" targetRef="Activity_0317o28"> | <sequenceFlow id="Flow_04is4m4" name="if this" sourceRef="Activity_0131ilb" targetRef="Activity_0317o28"> |
<conditionExpression xsi:type="tFormalExpression"></conditionExpression> | <conditionExpression xsi:type="tFormalExpression" /> |
</sequenceFlow> | </sequenceFlow> |
<task id="Activity_0fkgdc1" name="Do that"> | <task id="Activity_0fkgdc1" name="Do that"> |
</task> | </task> |
<sequenceFlow id="Flow_02u49rt" name="if that" sourceRef="Activity_0131ilb" targetRef="Activity_0fkgdc1"> | <sequenceFlow id="Flow_02u49rt" name="if that" sourceRef="Activity_0131ilb" targetRef="Activity_0fkgdc1"> |
<conditionExpression xsi:type="tFormalExpression"></conditionExpression> | <conditionExpression xsi:type="tFormalExpression" /> |
</sequenceFlow> | </sequenceFlow> |
</process> | </process> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Activity_0317o28_di" bpmnElement="Activity_0317o28"> | <bpmndi:BPMNShape id="Activity_0317o28_di" bpmnElement="Activity_0317o28"> |
<omgdc:Bounds x="390" y="60" width="100" height="80" /> | <omgdc:Bounds x="390" y="40" width="100" height="80" /> |
<bpmndi:BPMNLabel /> | <bpmndi:BPMNLabel /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Activity_0fkgdc1_di" bpmnElement="Activity_0fkgdc1"> | <bpmndi:BPMNShape id="Activity_0fkgdc1_di" bpmnElement="Activity_0fkgdc1"> |
<omgdc:Bounds x="390" y="240" width="100" height="80" /> | <omgdc:Bounds x="390" y="260" width="100" height="80" /> |
<bpmndi:BPMNLabel /> | <bpmndi:BPMNLabel /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNEdge id="Flow_04is4m4_di" bpmnElement="Flow_04is4m4"> | <bpmndi:BPMNEdge id="Flow_04is4m4_di" bpmnElement="Flow_04is4m4"> |
<omgdi:waypoint x="310" y="150" /> | <omgdi:waypoint x="310" y="150" /> |
<omgdi:waypoint x="310" y="100" /> | <omgdi:waypoint x="310" y="80" /> |
<omgdi:waypoint x="390" y="100" /> | <omgdi:waypoint x="390" y="80" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="326" y="103" width="27" height="14" /> | <omgdc:Bounds x="326" y="83" width="27" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_02u49rt_di" bpmnElement="Flow_02u49rt"> | <bpmndi:BPMNEdge id="Flow_02u49rt_di" bpmnElement="Flow_02u49rt"> |
<omgdi:waypoint x="310" y="230" /> | <omgdi:waypoint x="310" y="230" /> |
<omgdi:waypoint x="310" y="280" /> | <omgdi:waypoint x="310" y="300" /> |
<omgdi:waypoint x="390" y="280" /> | <omgdi:waypoint x="390" y="300" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="326" y="263" width="28" height="14" /> | <omgdc:Bounds x="326" y="283" width="28" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
===== Notes ===== | ===== Notes ===== |
| |
Put extra comments here (this section is optional) | * It's sometimes argued that conditional flows saves one element (the gateway) and hence makes the diagram simpler. This argument is hardly acceptable because the gateway adds value to the diagram by making process execution logic clear. |
| * Conditional flows outgoing from an activity are idependent, hence the inclusive gateway in the "How to" diagram above. |
===== Exceptions ===== | |
| |
Specify exceptions to the rule above, if any | |
===== See also ===== | ===== See also ===== |
| |
* [[one_outgoing_control_flow]] | * [[en:rule:explicit_parallel_split]] |
| |
===== Автор(ы) ===== | ===== Автор(ы) ===== |
| |
--- //[[user:bell|Anatoly Belaychuk]] 2023-09-10 13:40// | --- //[[user:bell|Anatoly Belaychuk]] 2024-01-08 17:01// |