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:check_subprocess_results [2023-08-19 13:29] – removed - external edit (Unknown date) 127.0.0.1en:rule:check_subprocess_results [2024-08-22 20:12] (current) – [Check subprocess results on exit] Anatoly Belaychuk
Line 1: Line 1:
 +====== Check subprocess result on exit ======
 +
 +{{tag>subprocess gateway}}
 +===== ✔ How to =====
 +
 +<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_18m1du3">
 +    <subProcess id="Activity_1hd1dgq" name="Negotiate deal">
 +      <incoming>Flow_017eh8n</incoming>
 +      <outgoing>Flow_1gmtur1</outgoing>
 +    </subProcess>
 +    <exclusiveGateway id="Gateway_08zcsvd" name="Deal?">
 +      <incoming>Flow_1gmtur1</incoming>
 +      <outgoing>Flow_0znuxn6</outgoing>
 +      <outgoing>Flow_0eaj2kq</outgoing>
 +    </exclusiveGateway>
 +    <sequenceFlow id="Flow_1gmtur1" sourceRef="Activity_1hd1dgq" targetRef="Gateway_08zcsvd" />
 +    <task id="Activity_0p0yxli" name="Proceed">
 +      <incoming>Flow_0znuxn6</incoming>
 +      <outgoing>Flow_1pbytyb</outgoing>
 +    </task>
 +    <sequenceFlow id="Flow_0znuxn6" name="yes" sourceRef="Gateway_08zcsvd" targetRef="Activity_0p0yxli" />
 +    <endEvent id="Event_1tr3rn1" name="No deal">
 +      <incoming>Flow_0eaj2kq</incoming>
 +    </endEvent>
 +    <sequenceFlow id="Flow_0eaj2kq" name="no" sourceRef="Gateway_08zcsvd" targetRef="Event_1tr3rn1" />
 +    <startEvent id="Event_1mad8sj">
 +      <outgoing>Flow_017eh8n</outgoing>
 +    </startEvent>
 +    <sequenceFlow id="Flow_017eh8n" sourceRef="Event_1mad8sj" targetRef="Activity_1hd1dgq" />
 +    <endEvent id="Event_0j7s04q" name="Success">
 +      <incoming>Flow_1pbytyb</incoming>
 +    </endEvent>
 +    <sequenceFlow id="Flow_1pbytyb" sourceRef="Activity_0p0yxli" targetRef="Event_0j7s04q" />
 +  </process>
 +  <bpmndi:BPMNDiagram id="BpmnDiagram_1">
 +    <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_18m1du3">
 +      <bpmndi:BPMNShape id="Activity_0s12n49_di" bpmnElement="Activity_1hd1dgq">
 +        <omgdc:Bounds x="190" y="90" width="100" height="80" />
 +        <bpmndi:BPMNLabel />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Gateway_08zcsvd_di" bpmnElement="Gateway_08zcsvd" isMarkerVisible="true">
 +        <omgdc:Bounds x="335" y="105" width="50" height="50" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="345" y="75" width="30" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Activity_0p0yxli_di" bpmnElement="Activity_0p0yxli">
 +        <omgdc:Bounds x="440" y="90" width="100" height="80" />
 +        <bpmndi:BPMNLabel />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Event_1tr3rn1_di" bpmnElement="Event_1tr3rn1">
 +        <omgdc:Bounds x="342" y="212" width="36" height="36" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="341" y="255" width="38" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Event_1mad8sj_di" bpmnElement="Event_1mad8sj">
 +        <omgdc:Bounds x="112" y="112" width="36" height="36" />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Event_0j7s04q_di" bpmnElement="Event_0j7s04q">
 +        <omgdc:Bounds x="582" y="112" width="36" height="36" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="579" y="155" width="42" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNEdge id="Flow_1gmtur1_di" bpmnElement="Flow_1gmtur1">
 +        <omgdi:waypoint x="290" y="130" />
 +        <omgdi:waypoint x="335" y="130" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_0znuxn6_di" bpmnElement="Flow_0znuxn6">
 +        <omgdi:waypoint x="385" y="130" />
 +        <omgdi:waypoint x="440" y="130" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="404" y="112" width="17" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_0eaj2kq_di" bpmnElement="Flow_0eaj2kq">
 +        <omgdi:waypoint x="360" y="155" />
 +        <omgdi:waypoint x="360" y="212" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="369" y="181" width="13" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_017eh8n_di" bpmnElement="Flow_017eh8n">
 +        <omgdi:waypoint x="148" y="130" />
 +        <omgdi:waypoint x="190" y="130" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_1pbytyb_di" bpmnElement="Flow_1pbytyb">
 +        <omgdi:waypoint x="540" y="130" />
 +        <omgdi:waypoint x="582" y="130" />
 +      </bpmndi:BPMNEdge>
 +    </bpmndi:BPMNPlane>
 +  </bpmndi:BPMNDiagram>
 +  <bpmndi:BPMNDiagram id="BPMNDiagram_0k8h0e8">
 +    <bpmndi:BPMNPlane id="BPMNPlane_05v2aah" bpmnElement="Activity_1hd1dgq" />
 +  </bpmndi:BPMNDiagram>
 +</definitions>
 +</bpmnio>
 +
 +===== ✘ How NOT to =====
 +
 +<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_18m1du3">
 +    <subProcess id="Activity_1hd1dgq" name="Negotiate deal">
 +      <incoming>Flow_014fv7m</incoming>
 +      <outgoing>Flow_15xjhk7</outgoing>
 +    </subProcess>
 +    <sequenceFlow id="Flow_15xjhk7" sourceRef="Activity_1hd1dgq" targetRef="Activity_0xmeje2" />
 +    <subProcess id="Activity_0xmeje2" name="Prepare and sign contract">
 +      <incoming>Flow_15xjhk7</incoming>
 +      <outgoing>Flow_1pveezk</outgoing>
 +    </subProcess>
 +    <endEvent id="Event_096q8k8" name="Success">
 +      <incoming>Flow_1pveezk</incoming>
 +    </endEvent>
 +    <sequenceFlow id="Flow_1pveezk" sourceRef="Activity_0xmeje2" targetRef="Event_096q8k8" />
 +    <startEvent id="Event_0u89g2q">
 +      <outgoing>Flow_014fv7m</outgoing>
 +    </startEvent>
 +    <sequenceFlow id="Flow_014fv7m" sourceRef="Event_0u89g2q" targetRef="Activity_1hd1dgq" />
 +  </process>
 +  <bpmndi:BPMNDiagram id="BpmnDiagram_1">
 +    <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_18m1du3">
 +      <bpmndi:BPMNShape id="Event_096q8k8_di" bpmnElement="Event_096q8k8">
 +        <omgdc:Bounds x="482" y="112" width="36" height="36" />
 +        <bpmndi:BPMNLabel>
 +          <omgdc:Bounds x="479" y="155" width="42" height="14" />
 +        </bpmndi:BPMNLabel>
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Event_0u89g2q_di" bpmnElement="Event_0u89g2q">
 +        <omgdc:Bounds x="112" y="112" width="36" height="36" />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Activity_0s12n49_di" bpmnElement="Activity_1hd1dgq">
 +        <omgdc:Bounds x="190" y="90" width="100" height="80" />
 +        <bpmndi:BPMNLabel />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNShape id="Activity_1k3mm3u_di" bpmnElement="Activity_0xmeje2">
 +        <omgdc:Bounds x="340" y="90" width="100" height="80" />
 +      </bpmndi:BPMNShape>
 +      <bpmndi:BPMNEdge id="Flow_15xjhk7_di" bpmnElement="Flow_15xjhk7">
 +        <omgdi:waypoint x="290" y="130" />
 +        <omgdi:waypoint x="340" y="130" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_1pveezk_di" bpmnElement="Flow_1pveezk">
 +        <omgdi:waypoint x="440" y="130" />
 +        <omgdi:waypoint x="482" y="130" />
 +      </bpmndi:BPMNEdge>
 +      <bpmndi:BPMNEdge id="Flow_014fv7m_di" bpmnElement="Flow_014fv7m">
 +        <omgdi:waypoint x="148" y="130" />
 +        <omgdi:waypoint x="190" y="130" />
 +      </bpmndi:BPMNEdge>
 +    </bpmndi:BPMNPlane>
 +  </bpmndi:BPMNDiagram>
 +  <bpmndi:BPMNDiagram id="BPMNDiagram_0k8h0e8">
 +    <bpmndi:BPMNPlane id="BPMNPlane_05v2aah" bpmnElement="Activity_1hd1dgq" />
 +  </bpmndi:BPMNDiagram>
 +  <bpmndi:BPMNDiagram id="BPMNDiagram_1gsascs">
 +    <bpmndi:BPMNPlane id="BPMNPlane_0qs6irk" bpmnElement="Activity_0xmeje2" />
 +  </bpmndi:BPMNDiagram>
 +</definitions>
 +</bpmnio>
 +
 +===== Notes =====
 +
 +  * If a subprocess isn't followed by a gateway then it is assumed that the subprocess is always successful which usually isn't the case. A subprocess not followed by a gateway may be not a mistake but should raise question whether we anticipate the possibility of unsuccessful subprocess completion.
 +  * This rule is applicable to embedded subprocesses and call activities calling a process, collapsed and expanded subprocesses.
 +===== Exceptions =====
 +
 +  * Deal negotiation in the "How not to" diagram above may be always successful if it's concluded between affilated parties, e.g. a business unit company and a shared services company belonging to a single group. No need for a gateway in this case.
 +===== See also =====
 +
 +  * [[en:rule:business_exception_error]]
 +  * [[en:rule:human_decision]]
 +
 +===== Author(s) =====
 +
 + --- //[[user:bell|Anatoly Belaychuk]] 2023-08-06 14:41//