Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:rule:do_not_use_conditional_flows [2024-01-08 16:51] Anatoly Belaychuken:rule:do_not_use_conditional_flows [2024-02-07 11:45] (current) – [Notes] Anatoly Belaychuk
Line 1: Line 1:
-====== 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 =====
Line 14: Line 12:
   <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_1em6o86sourceRef="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">
Line 35: Line 34:
         <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>
Line 77: Line 81:
     </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">
Line 83: Line 87:
     </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>
Line 92: Line 96:
       </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>
Line 121: Line 125:
 ===== Notes ===== ===== Notes =====
  
-Put extra comments here (this section is optional) +  * It's sometimes argued that conditional flows saves one element (the gatewayand 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//