Both sides previous revision Previous revision Next revision | Previous revision |
en:rule:event_gateway_warning [2023-09-10 12:34] – [✘ How NOT to] Anatoly Belaychuk | en:rule:event_gateway_warning [2024-08-24 15:49] (current) – [Use event gateways with caution] Anatoly Belaychuk |
---|
====== 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 ===== |
<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"> | <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"> | <process id="Process_0kf0077"> |
<subProcess id="Activity_1tn5n73"> | <startEvent id="Event_13ec10q"> |
<startEvent id="Event_13ec10q"> | <outgoing>Flow_1v91670</outgoing> |
<outgoing>Flow_0c37d4z</outgoing> | </startEvent> |
</startEvent> | <parallelGateway id="Gateway_08peucq"> |
<sequenceFlow id="Flow_0c37d4z" sourceRef="Event_13ec10q" targetRef="Gateway_08peucq" /> | <incoming>Flow_1v91670</incoming> |
<parallelGateway id="Gateway_08peucq"> | <outgoing>Flow_1bmuvfd</outgoing> |
<incoming>Flow_0c37d4z</incoming> | <outgoing>Flow_1omf6ox</outgoing> |
<outgoing>Flow_05uwose</outgoing> | </parallelGateway> |
<outgoing>Flow_1yoh8c2</outgoing> | <endEvent id="Event_1k1tn88" name="Paid"> |
</parallelGateway> | <incoming>Flow_1x386gx</incoming> |
<task id="Activity_1mnvjuz" name="Obtain payment"> | <terminateEventDefinition id="TerminateEventDefinition_0ku242o" /> |
<incoming>Flow_05uwose</incoming> | </endEvent> |
<outgoing>Flow_0xinlw8</outgoing> | <sequenceFlow id="Flow_1v91670" sourceRef="Event_13ec10q" targetRef="Gateway_08peucq" /> |
</task> | <sequenceFlow id="Flow_1bmuvfd" sourceRef="Gateway_08peucq" targetRef="Event_1hlib99" /> |
<sequenceFlow id="Flow_05uwose" sourceRef="Gateway_08peucq" targetRef="Activity_1mnvjuz" /> | <intermediateCatchEvent id="Event_0r0tew3" name="Payment due date"> |
<intermediateCatchEvent id="Event_0r0tew3" name="Payment due date"> | <incoming>Flow_0tjh6sh</incoming> |
<incoming>Flow_0tjh6sh</incoming> | <outgoing>Flow_0vj1spf</outgoing> |
<outgoing>Flow_0vj1spf</outgoing> | <timerEventDefinition id="TimerEventDefinition_1a77cp0" /> |
<timerEventDefinition id="TimerEventDefinition_1a77cp0" /> | </intermediateCatchEvent> |
</intermediateCatchEvent> | <exclusiveGateway id="Gateway_1jxup79"> |
<exclusiveGateway id="Gateway_1jxup79"> | <incoming>Flow_1fpmuu7</incoming> |
<incoming>Flow_1yoh8c2</incoming> | <incoming>Flow_1omf6ox</incoming> |
<incoming>Flow_1fpmuu7</incoming> | <outgoing>Flow_0tjh6sh</outgoing> |
<outgoing>Flow_0tjh6sh</outgoing> | </exclusiveGateway> |
</exclusiveGateway> | <task id="Activity_12mr8cn" name="Clarify delay with the client"> |
<sequenceFlow id="Flow_1yoh8c2" sourceRef="Gateway_08peucq" targetRef="Gateway_1jxup79" /> | <incoming>Flow_0vj1spf</incoming> |
<sequenceFlow id="Flow_0tjh6sh" sourceRef="Gateway_1jxup79" targetRef="Event_0r0tew3" /> | <outgoing>Flow_0v7giyt</outgoing> |
<sequenceFlow id="Flow_0xinlw8" sourceRef="Activity_1mnvjuz" targetRef="Event_1k1tn88" /> | </task> |
<endEvent id="Event_1k1tn88" name="Paid"> | <exclusiveGateway id="Gateway_0gfb7mo" name="Wait more?"> |
<incoming>Flow_0xinlw8</incoming> | <incoming>Flow_0v7giyt</incoming> |
<terminateEventDefinition id="TerminateEventDefinition_0ku242o" /> | <outgoing>Flow_0xssdyb</outgoing> |
</endEvent> | <outgoing>Flow_1fpmuu7</outgoing> |
<task id="Activity_12mr8cn" name="Clarify delay with the client"> | </exclusiveGateway> |
<incoming>Flow_0vj1spf</incoming> | <endEvent id="Event_04k06ga" name="Not paid"> |
<outgoing>Flow_0v7giyt</outgoing> | <incoming>Flow_0xssdyb</incoming> |
</task> | <terminateEventDefinition id="TerminateEventDefinition_0jd5cs4" /> |
<sequenceFlow id="Flow_0vj1spf" sourceRef="Event_0r0tew3" targetRef="Activity_12mr8cn" /> | </endEvent> |
<exclusiveGateway id="Gateway_0gfb7mo" name="Wait more?"> | <sequenceFlow id="Flow_0tjh6sh" sourceRef="Gateway_1jxup79" targetRef="Event_0r0tew3" /> |
<incoming>Flow_0v7giyt</incoming> | <sequenceFlow id="Flow_0vj1spf" sourceRef="Event_0r0tew3" targetRef="Activity_12mr8cn" /> |
<outgoing>Flow_0xssdyb</outgoing> | <sequenceFlow id="Flow_1fpmuu7" name="yes" sourceRef="Gateway_0gfb7mo" targetRef="Gateway_1jxup79" /> |
<outgoing>Flow_1fpmuu7</outgoing> | <sequenceFlow id="Flow_0v7giyt" sourceRef="Activity_12mr8cn" targetRef="Gateway_0gfb7mo" /> |
</exclusiveGateway> | <sequenceFlow id="Flow_0xssdyb" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" /> |
<sequenceFlow id="Flow_0v7giyt" sourceRef="Activity_12mr8cn" targetRef="Gateway_0gfb7mo" /> | <sequenceFlow id="Flow_1omf6ox" sourceRef="Gateway_08peucq" targetRef="Gateway_1jxup79" /> |
<sequenceFlow id="Flow_0xssdyb" name="no" sourceRef="Gateway_0gfb7mo" targetRef="Event_04k06ga" /> | <intermediateCatchEvent id="Event_1hlib99" name="Payment obtained"> |
<sequenceFlow id="Flow_1fpmuu7" name="yes" sourceRef="Gateway_0gfb7mo" targetRef="Gateway_1jxup79" /> | <incoming>Flow_1bmuvfd</incoming> |
<endEvent id="Event_04k06ga" name="Not paid"> | <outgoing>Flow_1x386gx</outgoing> |
<incoming>Flow_0xssdyb</incoming> | <messageEventDefinition id="MessageEventDefinition_0gm96fa" /> |
<terminateEventDefinition id="TerminateEventDefinition_0jd5cs4" /> | </intermediateCatchEvent> |
</endEvent> | <sequenceFlow id="Flow_1x386gx" sourceRef="Event_1hlib99" targetRef="Event_1k1tn88" /> |
</subProcess> | |
</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="Activity_1tn5n73_di" bpmnElement="Activity_1tn5n73" isExpanded="true"> | |
<omgdc:Bounds x="290" y="-620" width="640" height="330" /> | |
</bpmndi:BPMNShape> | |
<bpmndi:BPMNShape id="Event_13ec10q_di" bpmnElement="Event_13ec10q"> | <bpmndi:BPMNShape id="Event_13ec10q_di" bpmnElement="Event_13ec10q"> |
<omgdc:Bounds x="332" y="-388" width="36" height="36" /> | <omgdc:Bounds x="302" y="-178" width="36" height="36" /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Gateway_1ay1ssw_di" bpmnElement="Gateway_08peucq"> | <bpmndi:BPMNShape id="Gateway_1ay1ssw_di" bpmnElement="Gateway_08peucq"> |
<omgdc:Bounds x="405" y="-395" width="50" height="50" /> | <omgdc:Bounds x="375" y="-185" width="50" height="50" /> |
</bpmndi:BPMNShape> | |
<bpmndi:BPMNShape id="Activity_1mnvjuz_di" bpmnElement="Activity_1mnvjuz"> | |
<omgdc:Bounds x="490" y="-410" width="100" height="80" /> | |
<bpmndi:BPMNLabel /> | |
</bpmndi:BPMNShape> | |
<bpmndi:BPMNShape id="Gateway_1jxup79_di" bpmnElement="Gateway_1jxup79" isMarkerVisible="true"> | |
<omgdc:Bounds x="405" y="-505" width="50" height="50" /> | |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Event_1f2yzhy_di" bpmnElement="Event_0r0tew3"> | <bpmndi:BPMNShape id="Event_1f2yzhy_di" bpmnElement="Event_0r0tew3"> |
<omgdc:Bounds x="522" y="-498" width="36" height="36" /> | <omgdc:Bounds x="492" y="-298" width="36" height="36" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="495" y="-455" width="90" height="14" /> | <omgdc:Bounds x="465" y="-255" width="90" height="14" /> |
</bpmndi:BPMNLabel> | </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> |
<bpmndi:BPMNShape id="Activity_12mr8cn_di" bpmnElement="Activity_12mr8cn"> | <bpmndi:BPMNShape id="Activity_12mr8cn_di" bpmnElement="Activity_12mr8cn"> |
<omgdc:Bounds x="620" y="-520" width="100" height="80" /> | <omgdc:Bounds x="590" y="-320" width="100" height="80" /> |
<bpmndi:BPMNLabel /> | <bpmndi:BPMNLabel /> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Event_0s7eoii_di" bpmnElement="Event_1k1tn88"> | <bpmndi:BPMNShape id="Gateway_0gfb7mo_di" bpmnElement="Gateway_0gfb7mo" isMarkerVisible="true"> |
<omgdc:Bounds x="652" y="-388" width="36" height="36" /> | <omgdc:Bounds x="735" y="-305" width="50" height="50" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="659" y="-345" width="23" height="14" /> | <omgdc:Bounds x="732" y="-248" width="56" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Gateway_0gfb7mo_di" bpmnElement="Gateway_0gfb7mo" isMarkerVisible="true"> | <bpmndi:BPMNShape id="Event_1kp0poi_di" bpmnElement="Event_04k06ga"> |
<omgdc:Bounds x="765" y="-505" width="50" height="50" /> | <omgdc:Bounds x="822" y="-298" width="36" height="36" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="762" y="-448" width="56" height="14" /> | <omgdc:Bounds x="819" y="-255" width="42" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNShape id="Event_1kp0poi_di" bpmnElement="Event_04k06ga"> | <bpmndi:BPMNShape id="Event_07hur9k_di" bpmnElement="Event_1hlib99"> |
<omgdc:Bounds x="852" y="-498" width="36" height="36" /> | <omgdc:Bounds x="492" y="-178" width="36" height="36" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="849" y="-455" width="42" height="14" /> | <omgdc:Bounds x="466" y="-135" width="89" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNShape> | </bpmndi:BPMNShape> |
<bpmndi:BPMNEdge id="Flow_0c37d4z_di" bpmnElement="Flow_0c37d4z"> | <bpmndi:BPMNShape id="Event_0s7eoii_di" bpmnElement="Event_1k1tn88"> |
<omgdi:waypoint x="368" y="-370" /> | <omgdc:Bounds x="622" y="-178" width="36" height="36" /> |
<omgdi:waypoint x="405" y="-370" /> | <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> |
<bpmndi:BPMNEdge id="Flow_05uwose_di" bpmnElement="Flow_05uwose"> | <bpmndi:BPMNEdge id="Flow_1bmuvfd_di" bpmnElement="Flow_1bmuvfd"> |
<omgdi:waypoint x="455" y="-370" /> | <omgdi:waypoint x="425" y="-160" /> |
<omgdi:waypoint x="490" y="-370" /> | <omgdi:waypoint x="492" y="-160" /> |
</bpmndi:BPMNEdge> | |
<bpmndi:BPMNEdge id="Flow_1yoh8c2_di" bpmnElement="Flow_1yoh8c2"> | |
<omgdi:waypoint x="430" y="-395" /> | |
<omgdi:waypoint x="430" y="-455" /> | |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_0tjh6sh_di" bpmnElement="Flow_0tjh6sh"> | <bpmndi:BPMNEdge id="Flow_0tjh6sh_di" bpmnElement="Flow_0tjh6sh"> |
<omgdi:waypoint x="455" y="-480" /> | <omgdi:waypoint x="425" y="-280" /> |
<omgdi:waypoint x="522" y="-480" /> | <omgdi:waypoint x="492" y="-280" /> |
</bpmndi:BPMNEdge> | |
<bpmndi:BPMNEdge id="Flow_0xinlw8_di" bpmnElement="Flow_0xinlw8"> | |
<omgdi:waypoint x="590" y="-370" /> | |
<omgdi:waypoint x="652" y="-370" /> | |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_0vj1spf_di" bpmnElement="Flow_0vj1spf"> | <bpmndi:BPMNEdge id="Flow_0vj1spf_di" bpmnElement="Flow_0vj1spf"> |
<omgdi:waypoint x="558" y="-480" /> | <omgdi:waypoint x="528" y="-280" /> |
<omgdi:waypoint x="620" y="-480" /> | <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> |
<bpmndi:BPMNEdge id="Flow_0v7giyt_di" bpmnElement="Flow_0v7giyt"> | <bpmndi:BPMNEdge id="Flow_0v7giyt_di" bpmnElement="Flow_0v7giyt"> |
<omgdi:waypoint x="720" y="-480" /> | <omgdi:waypoint x="690" y="-280" /> |
<omgdi:waypoint x="765" y="-480" /> | <omgdi:waypoint x="735" y="-280" /> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_0xssdyb_di" bpmnElement="Flow_0xssdyb"> | <bpmndi:BPMNEdge id="Flow_0xssdyb_di" bpmnElement="Flow_0xssdyb"> |
<omgdi:waypoint x="815" y="-480" /> | <omgdi:waypoint x="785" y="-280" /> |
<omgdi:waypoint x="852" y="-480" /> | <omgdi:waypoint x="822" y="-280" /> |
<bpmndi:BPMNLabel> | <bpmndi:BPMNLabel> |
<omgdc:Bounds x="827" y="-498" width="13" height="14" /> | <omgdc:Bounds x="797" y="-298" width="13" height="14" /> |
</bpmndi:BPMNLabel> | </bpmndi:BPMNLabel> |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
<bpmndi:BPMNEdge id="Flow_1fpmuu7_di" bpmnElement="Flow_1fpmuu7"> | <bpmndi:BPMNEdge id="Flow_1omf6ox_di" bpmnElement="Flow_1omf6ox"> |
<omgdi:waypoint x="790" y="-505" /> | <omgdi:waypoint x="400" y="-185" /> |
<omgdi:waypoint x="790" y="-570" /> | <omgdi:waypoint x="400" y="-255" /> |
<omgdi:waypoint x="430" y="-570" /> | </bpmndi:BPMNEdge> |
<omgdi:waypoint x="430" y="-505" /> | <bpmndi:BPMNEdge id="Flow_1x386gx_di" bpmnElement="Flow_1x386gx"> |
<bpmndi:BPMNLabel> | <omgdi:waypoint x="528" y="-160" /> |
<omgdc:Bounds x="602" y="-588" width="17" height="14" /> | <omgdi:waypoint x="622" y="-160" /> |
</bpmndi:BPMNLabel> | |
</bpmndi:BPMNEdge> | </bpmndi:BPMNEdge> |
</bpmndi:BPMNPlane> | </bpmndi:BPMNPlane> |
===== 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 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 | |