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:event_gateway_warning [2023-09-10 12:49] – [Notes] Anatoly Belaychuken:rule:event_gateway_warning [2024-08-24 15:49] (current) – [Use event gateways with caution] Anatoly Belaychuk
Line 1: Line 1:
-====== Use the event gateway with caution ======+====== Use event gateways with caution ======
  
-{{tag>subprocess gateway event}}+{{tag>gateway parallel_gateway event_gateway}}
  
-{{en:underconstruction.png?nolink&200|}}+Event gateway immediately interrupts all catching events when any single one occurs. 
 +For more versatile logic consider the combination of parallel gateway and terminating event.
  
-Utilizing exclusive event-based gateway is a rather common mistake. What's missed in the diagram below is that the payment may arrive while we are discussing the issue with the client. If this happens, the message won't be catched and the process will hang on the gateway. 
 ===== ✔ How to ===== ===== ✔ How to =====
  
Line 20: Line 20:
       <outgoing>Flow_1omf6ox</outgoing>       <outgoing>Flow_1omf6ox</outgoing>
     </parallelGateway>     </parallelGateway>
-    <task id="Activity_1mnvjuz" name="Obtain payment"> 
-      <incoming>Flow_1bmuvfd</incoming> 
-      <outgoing>Flow_1ino9hy</outgoing> 
-    </task> 
     <endEvent id="Event_1k1tn88" name="Paid">     <endEvent id="Event_1k1tn88" name="Paid">
-      <incoming>Flow_1ino9hy</incoming>+      <incoming>Flow_1x386gx</incoming>
       <terminateEventDefinition id="TerminateEventDefinition_0ku242o" />       <terminateEventDefinition id="TerminateEventDefinition_0ku242o" />
     </endEvent>     </endEvent>
     <sequenceFlow id="Flow_1v91670" sourceRef="Event_13ec10q" targetRef="Gateway_08peucq" />     <sequenceFlow id="Flow_1v91670" sourceRef="Event_13ec10q" targetRef="Gateway_08peucq" />
-    <sequenceFlow id="Flow_1bmuvfd" sourceRef="Gateway_08peucq" targetRef="Activity_1mnvjuz" /> +    <sequenceFlow id="Flow_1bmuvfd" sourceRef="Gateway_08peucq" targetRef="Event_1hlib99" />
-    <sequenceFlow id="Flow_1ino9hy" sourceRef="Activity_1mnvjuz" targetRef="Event_1k1tn88" />+
     <intermediateCatchEvent id="Event_0r0tew3" name="Payment due date">     <intermediateCatchEvent id="Event_0r0tew3" name="Payment due date">
       <incoming>Flow_0tjh6sh</incoming>       <incoming>Flow_0tjh6sh</incoming>
Line 60: Line 55:
     <sequenceFlow id="Flow_0xssdyb" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" />     <sequenceFlow id="Flow_0xssdyb" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" />
     <sequenceFlow id="Flow_1omf6ox" sourceRef="Gateway_08peucq" targetRef="Gateway_1jxup79" />     <sequenceFlow id="Flow_1omf6ox" sourceRef="Gateway_08peucq" targetRef="Gateway_1jxup79" />
 +    <intermediateCatchEvent id="Event_1hlib99" name="Payment obtained">
 +      <incoming>Flow_1bmuvfd</incoming>
 +      <outgoing>Flow_1x386gx</outgoing>
 +      <messageEventDefinition id="MessageEventDefinition_0gm96fa" />
 +    </intermediateCatchEvent>
 +    <sequenceFlow id="Flow_1x386gx" sourceRef="Event_1hlib99" targetRef="Event_1k1tn88" />
   </process>   </process>
   <bpmndi:BPMNDiagram id="BpmnDiagram_1">   <bpmndi:BPMNDiagram id="BpmnDiagram_1">
     <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_0kf0077">     <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_0kf0077">
 +      <bpmndi:BPMNShape id="Event_13ec10q_di" bpmnElement="Event_13ec10q">
 +        <omgdc:Bounds x="302" y="-178" width="36" height="36" />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Gateway_1ay1ssw_di" bpmnElement="Gateway_08peucq">
 +        <omgdc:Bounds x="375" y="-185" width="50" height="50" />
 +      </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="Event_1f2yzhy_di" bpmnElement="Event_0r0tew3">       <bpmndi:BPMNShape id="Event_1f2yzhy_di" bpmnElement="Event_0r0tew3">
         <omgdc:Bounds x="492" y="-298" width="36" height="36" />         <omgdc:Bounds x="492" y="-298" width="36" height="36" />
Line 88: Line 95:
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape id="Event_13ec10q_di" bpmnElement="Event_13ec10q"> +      <bpmndi:BPMNShape id="Event_07hur9k_di" bpmnElement="Event_1hlib99"> 
-        <omgdc:Bounds x="302" y="-178" width="36" height="36" /> +        <omgdc:Bounds x="492" y="-178" width="36" height="36" /> 
-      </bpmndi:BPMNShape+        <bpmndi:BPMNLabel
-      <bpmndi:BPMNShape id="Gateway_1ay1ssw_di" bpmnElement="Gateway_08peucq"> +          <omgdc:Bounds x="466" y="-135" width="89" height="14" /> 
-        <omgdc:Bounds x="375" y="-185" width="50" height="50" /+        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape> +
-      <bpmndi:BPMNShape id="Activity_1mnvjuz_di" bpmnElement="Activity_1mnvjuz"+
-        <omgdc:Bounds x="470" y="-200" width="100" height="80" /+
-        <bpmndi:BPMNLabel />+
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="Event_0s7eoii_di" bpmnElement="Event_1k1tn88">       <bpmndi:BPMNShape id="Event_0s7eoii_di" bpmnElement="Event_1k1tn88">
-        <omgdc:Bounds x="612" y="-178" width="36" height="36" />+        <omgdc:Bounds x="622" y="-178" width="36" height="36" />
         <bpmndi:BPMNLabel>         <bpmndi:BPMNLabel>
-          <omgdc:Bounds x="619" y="-135" width="23" height="14" />+          <omgdc:Bounds x="629" y="-135" width="23" height="14" />
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>       </bpmndi:BPMNShape>
 +      <bpmndi:BPMNEdge id="Flow_1v91670_di" bpmnElement="Flow_1v91670">
 +        <omgdi:waypoint x="338" y="-160" />
 +        <omgdi:waypoint x="375" y="-160" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_1bmuvfd_di" bpmnElement="Flow_1bmuvfd">
 +        <omgdi:waypoint x="425" y="-160" />
 +        <omgdi:waypoint x="492" y="-160" />
 +      </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="Flow_0tjh6sh_di" bpmnElement="Flow_0tjh6sh">       <bpmndi:BPMNEdge id="Flow_0tjh6sh_di" bpmnElement="Flow_0tjh6sh">
         <omgdi:waypoint x="425" y="-280" />         <omgdi:waypoint x="425" y="-280" />
Line 131: Line 142:
           <omgdc:Bounds x="797" y="-298" width="13" height="14" />           <omgdc:Bounds x="797" y="-298" width="13" height="14" />
         </bpmndi:BPMNLabel>         </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge> 
-      <bpmndi:BPMNEdge id="Flow_1v91670_di" bpmnElement="Flow_1v91670"> 
-        <omgdi:waypoint x="338" y="-160" /> 
-        <omgdi:waypoint x="375" y="-160" /> 
-      </bpmndi:BPMNEdge> 
-      <bpmndi:BPMNEdge id="Flow_1bmuvfd_di" bpmnElement="Flow_1bmuvfd"> 
-        <omgdi:waypoint x="425" y="-160" /> 
-        <omgdi:waypoint x="470" y="-160" /> 
-      </bpmndi:BPMNEdge> 
-      <bpmndi:BPMNEdge id="Flow_1ino9hy_di" bpmnElement="Flow_1ino9hy"> 
-        <omgdi:waypoint x="570" y="-160" /> 
-        <omgdi:waypoint x="612" y="-160" /> 
       </bpmndi:BPMNEdge>       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="Flow_1omf6ox_di" bpmnElement="Flow_1omf6ox">       <bpmndi:BPMNEdge id="Flow_1omf6ox_di" bpmnElement="Flow_1omf6ox">
         <omgdi:waypoint x="400" y="-185" />         <omgdi:waypoint x="400" y="-185" />
         <omgdi:waypoint x="400" y="-255" />         <omgdi:waypoint x="400" y="-255" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_1x386gx_di" bpmnElement="Flow_1x386gx">
 +        <omgdi:waypoint x="528" y="-160" />
 +        <omgdi:waypoint x="622" y="-160" />
       </bpmndi:BPMNEdge>       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>     </bpmndi:BPMNPlane>
Line 304: Line 307:
 ===== Notes ===== ===== Notes =====
  
-Mind the difference between the diagrams above: while the "to do" process waits for the message all the time till the end, the "no to do" process interrupts when the timer triggers. If the message arrives while while we are discussing the issue with the client, it won't be catched and the process will hang after returning to the event gateway. This is rather common mistake. +Mind the difference between the diagrams below: while "to do" process waits for the message all the time till the end, "no to do" process interrupts when the timer triggers. If the message arrives while we are clarifying delay with the client, it won't be caught and the process will hang after returning to the event gateway.
-===== Exceptions ===== +
- +
-Specify exceptions to the rule above, if any +
 ===== See also ===== ===== See also =====
  
-Reference similar rules here (this section is optional)+  * [[en:rule:control_branch]] 
 +===== Автор(ы=====
  
-===== Автор(ы) =====+ --- //[[user:bell|Anatoly Belaychuk]] 2023-09-10 12:51//
  
-Put signature here