Show pageOld revisionsBacklinksCopy this pageBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Use default flow only in executable models ====== {{tag>default_flow}} Use default flow outgoing from the exclusive gateway only if the model to be executed by a process engine. ===== ✔ How to ===== Executable model: <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_15ed216"> <task id="Activity_026ukqj" name="Approve request"> <incoming>Flow_0i4dirv</incoming> <incoming>Flow_0ka3lo7</incoming> <outgoing>Flow_1ps4vkt</outgoing> </task> <exclusiveGateway id="Gateway_0uhmn8g" name="Approved?" default="Flow_1ytsb8j"> <incoming>Flow_1ps4vkt</incoming> <outgoing>Flow_00j2hvl</outgoing> <outgoing>Flow_0qwic4b</outgoing> <outgoing>Flow_1ytsb8j</outgoing> </exclusiveGateway> <sequenceFlow id="Flow_1ps4vkt" sourceRef="Activity_026ukqj" targetRef="Gateway_0uhmn8g" /> <task id="Activity_0crg87t" name="Adjust request"> <incoming>Flow_00j2hvl</incoming> <outgoing>Flow_0i4dirv</outgoing> </task> <sequenceFlow id="Flow_00j2hvl" name="adjustment needed" sourceRef="Gateway_0uhmn8g" targetRef="Activity_0crg87t" /> <endEvent id="Event_0598b4i" name="Request rejected"> <incoming>Flow_0qwic4b</incoming> </endEvent> <sequenceFlow id="Flow_0qwic4b" name="no" sourceRef="Gateway_0uhmn8g" targetRef="Event_0598b4i" /> <task id="Activity_0ima1sh" name="Process request"> <incoming>Flow_1ytsb8j</incoming> <outgoing>Flow_1cpgayi</outgoing> </task> <sequenceFlow id="Flow_1ytsb8j" name="yes" sourceRef="Gateway_0uhmn8g" targetRef="Activity_0ima1sh" /> <sequenceFlow id="Flow_0i4dirv" sourceRef="Activity_0crg87t" targetRef="Activity_026ukqj" /> <task id="Activity_17d50ei" name="Apply request"> <incoming>Flow_1s9xphs</incoming> <outgoing>Flow_0ka3lo7</outgoing> </task> <sequenceFlow id="Flow_0ka3lo7" sourceRef="Activity_17d50ei" targetRef="Activity_026ukqj" /> <startEvent id="Event_1wgw2sz"> <outgoing>Flow_1s9xphs</outgoing> </startEvent> <sequenceFlow id="Flow_1s9xphs" sourceRef="Event_1wgw2sz" targetRef="Activity_17d50ei" /> <endEvent id="Event_13bz61v" name="Requst processsed"> <incoming>Flow_1cpgayi</incoming> </endEvent> <sequenceFlow id="Flow_1cpgayi" sourceRef="Activity_0ima1sh" targetRef="Event_13bz61v" /> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_15ed216"> <bpmndi:BPMNShape id="Activity_026ukqj_di" bpmnElement="Activity_026ukqj"> <omgdc:Bounds x="390" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Gateway_0uhmn8g_di" bpmnElement="Gateway_0uhmn8g" isMarkerVisible="true"> <omgdc:Bounds x="545" y="235" width="50" height="50" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="544" y="292" width="53" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0crg87t_di" bpmnElement="Activity_0crg87t"> <omgdc:Bounds x="390" y="70" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_0598b4i_di" bpmnElement="Event_0598b4i"> <omgdc:Bounds x="552" y="372" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="549" y="415" width="42" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0ima1sh_di" bpmnElement="Activity_0ima1sh"> <omgdc:Bounds x="660" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_17d50ei_di" bpmnElement="Activity_17d50ei"> <omgdc:Bounds x="230" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_1wgw2sz_di" bpmnElement="Event_1wgw2sz"> <omgdc:Bounds x="142" y="242" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_13bz61v_di" bpmnElement="Event_13bz61v"> <omgdc:Bounds x="802" y="242" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="792" y="285" width="57" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_1ps4vkt_di" bpmnElement="Flow_1ps4vkt"> <omgdi:waypoint x="490" y="260" /> <omgdi:waypoint x="545" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_00j2hvl_di" bpmnElement="Flow_00j2hvl"> <omgdi:waypoint x="570" y="235" /> <omgdi:waypoint x="570" y="110" /> <omgdi:waypoint x="490" y="110" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="582" y="176" width="55" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0qwic4b_di" bpmnElement="Flow_0qwic4b"> <omgdi:waypoint x="570" y="285" /> <omgdi:waypoint x="570" y="372" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="579" y="326" width="13" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1ytsb8j_di" bpmnElement="Flow_1ytsb8j"> <omgdi:waypoint x="595" y="260" /> <omgdi:waypoint x="660" y="260" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="619" y="242" width="17" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0i4dirv_di" bpmnElement="Flow_0i4dirv"> <omgdi:waypoint x="440" y="150" /> <omgdi:waypoint x="440" y="220" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0ka3lo7_di" bpmnElement="Flow_0ka3lo7"> <omgdi:waypoint x="330" y="260" /> <omgdi:waypoint x="390" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1s9xphs_di" bpmnElement="Flow_1s9xphs"> <omgdi:waypoint x="178" y="260" /> <omgdi:waypoint x="230" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1cpgayi_di" bpmnElement="Flow_1cpgayi"> <omgdi:waypoint x="760" y="260" /> <omgdi:waypoint x="802" y="260" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> Non-executable model: <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_15ed216"> <task id="Activity_026ukqj" name="Approve request"> <incoming>Flow_0i4dirv</incoming> <incoming>Flow_0ka3lo7</incoming> <outgoing>Flow_1ps4vkt</outgoing> </task> <exclusiveGateway id="Gateway_0uhmn8g" name="Approved?"> <incoming>Flow_1ps4vkt</incoming> <outgoing>Flow_00j2hvl</outgoing> <outgoing>Flow_0qwic4b</outgoing> <outgoing>Flow_1ytsb8j</outgoing> </exclusiveGateway> <sequenceFlow id="Flow_1ps4vkt" sourceRef="Activity_026ukqj" targetRef="Gateway_0uhmn8g" /> <task id="Activity_0crg87t" name="Adjust request"> <incoming>Flow_00j2hvl</incoming> <outgoing>Flow_0i4dirv</outgoing> </task> <sequenceFlow id="Flow_00j2hvl" name="adjustment needed" sourceRef="Gateway_0uhmn8g" targetRef="Activity_0crg87t" /> <endEvent id="Event_0598b4i" name="Request rejected"> <incoming>Flow_0qwic4b</incoming> </endEvent> <sequenceFlow id="Flow_0qwic4b" name="no" sourceRef="Gateway_0uhmn8g" targetRef="Event_0598b4i" /> <task id="Activity_0ima1sh" name="Process request"> <incoming>Flow_1ytsb8j</incoming> <outgoing>Flow_1cpgayi</outgoing> </task> <sequenceFlow id="Flow_1ytsb8j" name="yes" sourceRef="Gateway_0uhmn8g" targetRef="Activity_0ima1sh" /> <sequenceFlow id="Flow_0i4dirv" sourceRef="Activity_0crg87t" targetRef="Activity_026ukqj" /> <task id="Activity_17d50ei" name="Apply request"> <incoming>Flow_1s9xphs</incoming> <outgoing>Flow_0ka3lo7</outgoing> </task> <sequenceFlow id="Flow_0ka3lo7" sourceRef="Activity_17d50ei" targetRef="Activity_026ukqj" /> <startEvent id="Event_1wgw2sz"> <outgoing>Flow_1s9xphs</outgoing> </startEvent> <sequenceFlow id="Flow_1s9xphs" sourceRef="Event_1wgw2sz" targetRef="Activity_17d50ei" /> <endEvent id="Event_13bz61v" name="Requst processsed"> <incoming>Flow_1cpgayi</incoming> </endEvent> <sequenceFlow id="Flow_1cpgayi" sourceRef="Activity_0ima1sh" targetRef="Event_13bz61v" /> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_15ed216"> <bpmndi:BPMNShape id="Activity_026ukqj_di" bpmnElement="Activity_026ukqj"> <omgdc:Bounds x="390" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Gateway_0uhmn8g_di" bpmnElement="Gateway_0uhmn8g" isMarkerVisible="true"> <omgdc:Bounds x="545" y="235" width="50" height="50" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="544" y="292" width="53" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0crg87t_di" bpmnElement="Activity_0crg87t"> <omgdc:Bounds x="390" y="70" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_0598b4i_di" bpmnElement="Event_0598b4i"> <omgdc:Bounds x="552" y="372" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="549" y="415" width="42" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0ima1sh_di" bpmnElement="Activity_0ima1sh"> <omgdc:Bounds x="660" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_17d50ei_di" bpmnElement="Activity_17d50ei"> <omgdc:Bounds x="230" y="220" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_1wgw2sz_di" bpmnElement="Event_1wgw2sz"> <omgdc:Bounds x="142" y="242" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Event_13bz61v_di" bpmnElement="Event_13bz61v"> <omgdc:Bounds x="802" y="242" width="36" height="36" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="792" y="285" width="57" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_1ps4vkt_di" bpmnElement="Flow_1ps4vkt"> <omgdi:waypoint x="490" y="260" /> <omgdi:waypoint x="545" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_00j2hvl_di" bpmnElement="Flow_00j2hvl"> <omgdi:waypoint x="570" y="235" /> <omgdi:waypoint x="570" y="110" /> <omgdi:waypoint x="490" y="110" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="582" y="176" width="55" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0qwic4b_di" bpmnElement="Flow_0qwic4b"> <omgdi:waypoint x="570" y="285" /> <omgdi:waypoint x="570" y="372" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="579" y="326" width="13" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1ytsb8j_di" bpmnElement="Flow_1ytsb8j"> <omgdi:waypoint x="595" y="260" /> <omgdi:waypoint x="660" y="260" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="619" y="242" width="17" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0i4dirv_di" bpmnElement="Flow_0i4dirv"> <omgdi:waypoint x="440" y="150" /> <omgdi:waypoint x="440" y="220" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0ka3lo7_di" bpmnElement="Flow_0ka3lo7"> <omgdi:waypoint x="330" y="260" /> <omgdi:waypoint x="390" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1s9xphs_di" bpmnElement="Flow_1s9xphs"> <omgdi:waypoint x="178" y="260" /> <omgdi:waypoint x="230" y="260" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1cpgayi_di" bpmnElement="Flow_1cpgayi"> <omgdi:waypoint x="760" y="260" /> <omgdi:waypoint x="802" y="260" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> ===== Notes ===== * When used in the executable model, the default flow guarantees that the process will continue even if there is a mistake in the flow conditions. E.g. there may be a gateway controlled by a boolean attribute stored in a database. Process designer may define flow conditions as "if value is TRUE" and "if value is FALSE". It'd be a mistake because the attribute value may be also NULL. Therefore it's more robust to define explicit condition for one flow and mark the other as default flow. * In case of analytical model default flow doesn't add value but may confuse reader. ===== Exceptions ===== The above applies to exclusive gateways only. As for exclusive gateways, the default flow is useful both in executable and non-executable models: <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_1vphr67"> <inclusiveGateway id="Gateway_0h14sq9" default="Flow_1fiufcu"> <outgoing>Flow_0v7gy70</outgoing> <outgoing>Flow_1q65gr0</outgoing> <outgoing>Flow_1fiufcu</outgoing> </inclusiveGateway> <task id="Activity_0s9ye6s" name="Fix syntax errors"> <incoming>Flow_0v7gy70</incoming> <outgoing>Flow_1yo36j4</outgoing> </task> <sequenceFlow id="Flow_0v7gy70" name="syntax errors detected" sourceRef="Gateway_0h14sq9" targetRef="Activity_0s9ye6s" /> <task id="Activity_0utrx8b" name="Fix substantial errors"> <incoming>Flow_1q65gr0</incoming> <outgoing>Flow_0lb8qxs</outgoing> </task> <sequenceFlow id="Flow_1q65gr0" name="substantial errors detected" sourceRef="Gateway_0h14sq9" targetRef="Activity_0utrx8b" /> <sequenceFlow id="Flow_0lb8qxs" sourceRef="Activity_0utrx8b" targetRef="Gateway_0ncb01t" /> <inclusiveGateway id="Gateway_0ncb01t"> <incoming>Flow_0lb8qxs</incoming> <incoming>Flow_1yo36j4</incoming> <incoming>Flow_1fiufcu</incoming> </inclusiveGateway> <sequenceFlow id="Flow_1yo36j4" sourceRef="Activity_0s9ye6s" targetRef="Gateway_0ncb01t" /> <sequenceFlow id="Flow_1fiufcu" sourceRef="Gateway_0h14sq9" targetRef="Gateway_0ncb01t" /> </process> <bpmndi:BPMNDiagram id="BpmnDiagram_1"> <bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Process_1vphr67"> <bpmndi:BPMNShape id="Gateway_12uxsxa_di" bpmnElement="Gateway_0h14sq9"> <omgdc:Bounds x="285" y="265" width="50" height="50" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0s9ye6s_di" bpmnElement="Activity_0s9ye6s"> <omgdc:Bounds x="400" y="140" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0utrx8b_di" bpmnElement="Activity_0utrx8b"> <omgdc:Bounds x="390" y="370" width="100" height="80" /> <bpmndi:BPMNLabel /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Gateway_1rj8ws5_di" bpmnElement="Gateway_0ncb01t"> <omgdc:Bounds x="545" y="265" width="50" height="50" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Flow_0v7gy70_di" bpmnElement="Flow_0v7gy70"> <omgdi:waypoint x="310" y="265" /> <omgdi:waypoint x="310" y="180" /> <omgdi:waypoint x="400" y="180" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="293" y="220" width="64" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1q65gr0_di" bpmnElement="Flow_1q65gr0"> <omgdi:waypoint x="310" y="315" /> <omgdi:waypoint x="310" y="410" /> <omgdi:waypoint x="390" y="410" /> <bpmndi:BPMNLabel> <omgdc:Bounds x="283" y="360" width="85" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0lb8qxs_di" bpmnElement="Flow_0lb8qxs"> <omgdi:waypoint x="490" y="410" /> <omgdi:waypoint x="570" y="410" /> <omgdi:waypoint x="570" y="315" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1yo36j4_di" bpmnElement="Flow_1yo36j4"> <omgdi:waypoint x="500" y="180" /> <omgdi:waypoint x="570" y="180" /> <omgdi:waypoint x="570" y="265" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1fiufcu_di" bpmnElement="Flow_1fiufcu"> <omgdi:waypoint x="335" y="290" /> <omgdi:waypoint x="545" y="290" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> </bpmnio> ===== See also ===== * [[en:term:analog_process]] * [[en:term:digital_process]] ===== Author(s) ===== --- //[[user:bell|Anatoly Belaychuk]] 2024-03-24 18:32// Last modified: 2025-04-01 11:25(external edit)