Differences

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

Link to this comparison view

Next revision
Previous revision
en:rule:event_gateway_warning [2023-09-10 12:21] – created 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.
-Put rule description here+
  
 ===== ✔ How to ===== ===== ✔ How to =====
  
-Put patterns (BPMN diagrams) here+<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_0kf0077"> 
 +    <startEvent id="Event_13ec10q"> 
 +      <outgoing>Flow_1v91670</outgoing> 
 +    </startEvent> 
 +    <parallelGateway id="Gateway_08peucq"> 
 +      <incoming>Flow_1v91670</incoming> 
 +      <outgoing>Flow_1bmuvfd</outgoing> 
 +      <outgoing>Flow_1omf6ox</outgoing> 
 +    </parallelGateway> 
 +    <endEvent id="Event_1k1tn88" name="Paid"> 
 +      <incoming>Flow_1x386gx</incoming> 
 +      <terminateEventDefinition id="TerminateEventDefinition_0ku242o" /> 
 +    </endEvent> 
 +    <sequenceFlow id="Flow_1v91670" sourceRef="Event_13ec10q" targetRef="Gateway_08peucq" /> 
 +    <sequenceFlow id="Flow_1bmuvfd" sourceRef="Gateway_08peucq" targetRef="Event_1hlib99" /> 
 +    <intermediateCatchEvent id="Event_0r0tew3" name="Payment due date"> 
 +      <incoming>Flow_0tjh6sh</incoming> 
 +      <outgoing>Flow_0vj1spf</outgoing> 
 +      <timerEventDefinition id="TimerEventDefinition_1a77cp0" /> 
 +    </intermediateCatchEvent> 
 +    <exclusiveGateway id="Gateway_1jxup79"> 
 +      <incoming>Flow_1fpmuu7</incoming> 
 +      <incoming>Flow_1omf6ox</incoming> 
 +      <outgoing>Flow_0tjh6sh</outgoing> 
 +    </exclusiveGateway> 
 +    <task id="Activity_12mr8cn" name="Clarify delay with the client"> 
 +      <incoming>Flow_0vj1spf</incoming> 
 +      <outgoing>Flow_0v7giyt</outgoing> 
 +    </task> 
 +    <exclusiveGateway id="Gateway_0gfb7mo" name="Wait more?"> 
 +      <incoming>Flow_0v7giyt</incoming> 
 +      <outgoing>Flow_0xssdyb</outgoing> 
 +      <outgoing>Flow_1fpmuu7</outgoing> 
 +    </exclusiveGateway> 
 +    <endEvent id="Event_04k06ga" name="Not paid"> 
 +      <incoming>Flow_0xssdyb</incoming> 
 +      <terminateEventDefinition id="TerminateEventDefinition_0jd5cs4" /> 
 +    </endEvent> 
 +    <sequenceFlow id="Flow_0tjh6sh" sourceRef="Gateway_1jxup79" targetRef="Event_0r0tew3" /> 
 +    <sequenceFlow id="Flow_0vj1spf" sourceRef="Event_0r0tew3" targetRef="Activity_12mr8cn" /> 
 +    <sequenceFlow id="Flow_1fpmuu7" name="yes" sourceRef="Gateway_0gfb7mo" targetRef="Gateway_1jxup79" /> 
 +    <sequenceFlow id="Flow_0v7giyt" sourceRef="Activity_12mr8cn" targetRef="Gateway_0gfb7mo" /> 
 +    <sequenceFlow id="Flow_0xssdyb" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" /> 
 +    <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> 
 +  <bpmndi:BPMNDiagram id="BpmnDiagram_1"> 
 +    <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"> 
 +        <omgdc:Bounds x="492" y="-298" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="465" y="-255" width="90" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Gateway_1jxup79_di" bpmnElement="Gateway_1jxup79" isMarkerVisible="true"> 
 +        <omgdc:Bounds x="375" y="-305" width="50" height="50" /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Activity_12mr8cn_di" bpmnElement="Activity_12mr8cn"> 
 +        <omgdc:Bounds x="590" y="-320" width="100" height="80" /> 
 +        <bpmndi:BPMNLabel /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Gateway_0gfb7mo_di" bpmnElement="Gateway_0gfb7mo" isMarkerVisible="true"> 
 +        <omgdc:Bounds x="735" y="-305" width="50" height="50" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="732" y="-248" width="56" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_1kp0poi_di" bpmnElement="Event_04k06ga"> 
 +        <omgdc:Bounds x="822" y="-298" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="819" y="-255" width="42" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_07hur9k_di" bpmnElement="Event_1hlib99"> 
 +        <omgdc:Bounds x="492" y="-178" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="466" y="-135" width="89" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_0s7eoii_di" bpmnElement="Event_1k1tn88"> 
 +        <omgdc:Bounds x="622" y="-178" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="629" y="-135" width="23" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </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"> 
 +        <omgdi:waypoint x="425" y="-280" /> 
 +        <omgdi:waypoint x="492" y="-280" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_0vj1spf_di" bpmnElement="Flow_0vj1spf"> 
 +        <omgdi:waypoint x="528" y="-280" /> 
 +        <omgdi:waypoint x="590" y="-280" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1fpmuu7_di" bpmnElement="Flow_1fpmuu7"> 
 +        <omgdi:waypoint x="760" y="-305" /> 
 +        <omgdi:waypoint x="760" y="-370" /> 
 +        <omgdi:waypoint x="400" y="-370" /> 
 +        <omgdi:waypoint x="400" y="-305" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="572" y="-388" width="17" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_0v7giyt_di" bpmnElement="Flow_0v7giyt"> 
 +        <omgdi:waypoint x="690" y="-280" /> 
 +        <omgdi:waypoint x="735" y="-280" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_0xssdyb_di" bpmnElement="Flow_0xssdyb"> 
 +        <omgdi:waypoint x="785" y="-280" /> 
 +        <omgdi:waypoint x="822" y="-280" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="797" y="-298" width="13" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1omf6ox_di" bpmnElement="Flow_1omf6ox"> 
 +        <omgdi:waypoint x="400" y="-185" /> 
 +        <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:BPMNPlane> 
 +  </bpmndi:BPMNDiagram> 
 +</definitions> 
 +</bpmnio>
  
 ===== ✘ How NOT to ===== ===== ✘ How NOT to =====
  
-Put antipattern (BPMN diagrams) here+<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_0kf0077"> 
 +    <intermediateCatchEvent id="Event_0r0tew3" name="Payment due date"> 
 +      <incoming>Flow_0opoyid</incoming> 
 +      <outgoing>Flow_1tv5ius</outgoing> 
 +      <timerEventDefinition id="TimerEventDefinition_1a77cp0" /> 
 +    </intermediateCatchEvent> 
 +    <intermediateCatchEvent id="Event_09tpike" name="Payment obtained"> 
 +      <incoming>Flow_11x2rmj</incoming> 
 +      <outgoing>Flow_1j4cmln</outgoing> 
 +      <messageEventDefinition id="MessageEventDefinition_0j2tmjq" /> 
 +    </intermediateCatchEvent> 
 +    <eventBasedGateway id="Gateway_0qwge4c"> 
 +      <incoming>Flow_1elj1ik</incoming> 
 +      <outgoing>Flow_11x2rmj</outgoing> 
 +      <outgoing>Flow_0opoyid</outgoing> 
 +    </eventBasedGateway> 
 +    <sequenceFlow id="Flow_11x2rmj" sourceRef="Gateway_0qwge4c" targetRef="Event_09tpike" /> 
 +    <sequenceFlow id="Flow_0opoyid" sourceRef="Gateway_0qwge4c" targetRef="Event_0r0tew3" /> 
 +    <startEvent id="Event_01ljcuy"> 
 +      <outgoing>Flow_104xfj6</outgoing> 
 +    </startEvent> 
 +    <sequenceFlow id="Flow_1j4cmln" sourceRef="Event_09tpike" targetRef="Event_1k1tn88" /> 
 +    <task id="Activity_12mr8cn" name="Clarify delay with the client"> 
 +      <incoming>Flow_1tv5ius</incoming> 
 +      <outgoing>Flow_06rckk1</outgoing> 
 +    </task> 
 +    <sequenceFlow id="Flow_1tv5ius" sourceRef="Event_0r0tew3" targetRef="Activity_12mr8cn" /> 
 +    <exclusiveGateway id="Gateway_0gfb7mo" name="Wait more?"> 
 +      <incoming>Flow_06rckk1</incoming> 
 +      <outgoing>Flow_0eyb0h5</outgoing> 
 +      <outgoing>Flow_083x67t</outgoing> 
 +    </exclusiveGateway> 
 +    <sequenceFlow id="Flow_06rckk1" sourceRef="Activity_12mr8cn" targetRef="Gateway_0gfb7mo" /> 
 +    <sequenceFlow id="Flow_0eyb0h5" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" /> 
 +    <endEvent id="Event_1k1tn88" name="Paid"> 
 +      <incoming>Flow_1j4cmln</incoming> 
 +    </endEvent> 
 +    <endEvent id="Event_04k06ga" name="Not paid"> 
 +      <incoming>Flow_0eyb0h5</incoming> 
 +    </endEvent> 
 +    <exclusiveGateway id="Gateway_057c6r5"> 
 +      <incoming>Flow_104xfj6</incoming> 
 +      <incoming>Flow_083x67t</incoming> 
 +      <outgoing>Flow_1elj1ik</outgoing> 
 +    </exclusiveGateway> 
 +    <sequenceFlow id="Flow_104xfj6" sourceRef="Event_01ljcuy" targetRef="Gateway_057c6r5" /> 
 +    <sequenceFlow id="Flow_1elj1ik" sourceRef="Gateway_057c6r5" targetRef="Gateway_0qwge4c" /> 
 +    <sequenceFlow id="Flow_083x67t" name="yes" sourceRef="Gateway_0gfb7mo" targetRef="Gateway_057c6r5" /> 
 +  </process> 
 +  <bpmndi:BPMNDiagram id="BpmnDiagram_1"> 
 +    <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_0kf0077"> 
 +      <bpmndi:BPMNShape id="Gateway_182m8yn_di" bpmnElement="Gateway_0qwge4c"> 
 +        <omgdc:Bounds x="395" y="-145" width="50" height="50" /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_0lccgc3_di" bpmnElement="Event_09tpike"> 
 +        <omgdc:Bounds x="512" y="-138" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="486" y="-95" width="89" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_1f2yzhy_di" bpmnElement="Event_0r0tew3"> 
 +        <omgdc:Bounds x="512" y="-258" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="485" y="-215" width="90" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_01ljcuy_di" bpmnElement="Event_01ljcuy"> 
 +        <omgdc:Bounds x="212" y="-138" width="36" height="36" /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Activity_12mr8cn_di" bpmnElement="Activity_12mr8cn"> 
 +        <omgdc:Bounds x="600" y="-280" width="100" height="80" /> 
 +        <bpmndi:BPMNLabel /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Gateway_0gfb7mo_di" bpmnElement="Gateway_0gfb7mo" isMarkerVisible="true"> 
 +        <omgdc:Bounds x="755" y="-265" width="50" height="50" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="752" y="-205" width="56" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_081tn46_di" bpmnElement="Event_1k1tn88"> 
 +        <omgdc:Bounds x="632" y="-138" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="639" y="-95" width="23" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Gateway_057c6r5_di" bpmnElement="Gateway_057c6r5" isMarkerVisible="true"> 
 +        <omgdc:Bounds x="295" y="-145" width="50" height="50" /> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNShape id="Event_1odkgr3_di" bpmnElement="Event_04k06ga"> 
 +        <omgdc:Bounds x="852" y="-258" width="36" height="36" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="849" y="-215" width="42" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNShape> 
 +      <bpmndi:BPMNEdge id="Flow_11x2rmj_di" bpmnElement="Flow_11x2rmj"> 
 +        <omgdi:waypoint x="445" y="-120" /> 
 +        <omgdi:waypoint x="512" y="-120" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_0opoyid_di" bpmnElement="Flow_0opoyid"> 
 +        <omgdi:waypoint x="420" y="-145" /> 
 +        <omgdi:waypoint x="420" y="-240" /> 
 +        <omgdi:waypoint x="512" y="-240" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1j4cmln_di" bpmnElement="Flow_1j4cmln"> 
 +        <omgdi:waypoint x="548" y="-120" /> 
 +        <omgdi:waypoint x="632" y="-120" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1tv5ius_di" bpmnElement="Flow_1tv5ius"> 
 +        <omgdi:waypoint x="548" y="-240" /> 
 +        <omgdi:waypoint x="600" y="-240" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_06rckk1_di" bpmnElement="Flow_06rckk1"> 
 +        <omgdi:waypoint x="700" y="-240" /> 
 +        <omgdi:waypoint x="755" y="-240" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_0eyb0h5_di" bpmnElement="Flow_0eyb0h5"> 
 +        <omgdi:waypoint x="805" y="-240" /> 
 +        <omgdi:waypoint x="852" y="-240" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="822" y="-258" width="13" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_104xfj6_di" bpmnElement="Flow_104xfj6"> 
 +        <omgdi:waypoint x="248" y="-120" /> 
 +        <omgdi:waypoint x="295" y="-120" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_1elj1ik_di" bpmnElement="Flow_1elj1ik"> 
 +        <omgdi:waypoint x="345" y="-120" /> 
 +        <omgdi:waypoint x="395" y="-120" /> 
 +      </bpmndi:BPMNEdge> 
 +      <bpmndi:BPMNEdge id="Flow_083x67t_di" bpmnElement="Flow_083x67t"> 
 +        <omgdi:waypoint x="780" y="-265" /> 
 +        <omgdi:waypoint x="780" y="-330" /> 
 +        <omgdi:waypoint x="320" y="-330" /> 
 +        <omgdi:waypoint x="320" y="-145" /> 
 +        <bpmndi:BPMNLabel> 
 +          <omgdc:Bounds x="542" y="-348" width="17" height="14" /> 
 +        </bpmndi:BPMNLabel> 
 +      </bpmndi:BPMNEdge> 
 +    </bpmndi:BPMNPlane> 
 +  </bpmndi:BPMNDiagram> 
 +</definitions> 
 +</bpmnio>
  
 ===== Notes ===== ===== Notes =====
  
-Put extra comments here (this section is optional) +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 aboveif 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