Rollback Scenario for recursive orchestration
[so.git] / bpmn / so-bpmn-building-blocks / src / main / resources / subprocess / BuildingBlock / DeleteChildServiceBB.bpmn
1 <?xml version="1.0" encoding="UTF-8"?>
2 <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0n06ztl" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.9.0">
3   <bpmn:process id="DeleteChildServiceBB" name="DeleteChildServiceBB" isExecutable="true">
4     <bpmn:startEvent id="StartEvent_1m5641e">
5       <bpmn:outgoing>SequenceFlow_01wirq3</bpmn:outgoing>
6     </bpmn:startEvent>
7     <bpmn:receiveTask id="ReceiveTask_0otx1r1" name="Wait for Completion" messageRef="Message_0xg6jua">
8       <bpmn:incoming>SequenceFlow_14d89qf</bpmn:incoming>
9       <bpmn:outgoing>SequenceFlow_1ufwh0a</bpmn:outgoing>
10     </bpmn:receiveTask>
11     <bpmn:endEvent id="EndEvent_02vkobe">
12       <bpmn:incoming>SequenceFlow_0o2ukb9</bpmn:incoming>
13       <bpmn:errorEventDefinition id="ErrorEventDefinition_05rpxbj" errorRef="Error_1d6c5q3" />
14     </bpmn:endEvent>
15     <bpmn:boundaryEvent id="BoundaryEvent_1f4g2g1" name="Timeout" attachedToRef="ReceiveTask_0otx1r1">
16       <bpmn:outgoing>SequenceFlow_0o2ukb9</bpmn:outgoing>
17       <bpmn:timerEventDefinition id="TimerEventDefinition_01na1b7">
18         <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5H</bpmn:timeDuration>
19       </bpmn:timerEventDefinition>
20     </bpmn:boundaryEvent>
21     <bpmn:sequenceFlow id="SequenceFlow_01wirq3" sourceRef="StartEvent_1m5641e" targetRef="Activity_078kmnt" />
22     <bpmn:sequenceFlow id="SequenceFlow_14d89qf" sourceRef="Task_16o0qkj" targetRef="ReceiveTask_0otx1r1" />
23     <bpmn:sequenceFlow id="SequenceFlow_0o2ukb9" sourceRef="BoundaryEvent_1f4g2g1" targetRef="EndEvent_02vkobe" />
24     <bpmn:exclusiveGateway id="ExclusiveGateway_1mxv8h6" name="Child Request Status" default="SequenceFlow_12rysg7">
25       <bpmn:incoming>SequenceFlow_1ufwh0a</bpmn:incoming>
26       <bpmn:outgoing>SequenceFlow_0v4loyx</bpmn:outgoing>
27       <bpmn:outgoing>SequenceFlow_12rysg7</bpmn:outgoing>
28     </bpmn:exclusiveGateway>
29     <bpmn:endEvent id="EndEvent_0fh7ikt">
30       <bpmn:incoming>SequenceFlow_0v4loyx</bpmn:incoming>
31       <bpmn:incoming>Flow_0wfcckg</bpmn:incoming>
32     </bpmn:endEvent>
33     <bpmn:sequenceFlow id="SequenceFlow_0v4loyx" name="Completed" sourceRef="ExclusiveGateway_1mxv8h6" targetRef="EndEvent_0fh7ikt">
34       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("CHILD_SVC_REQ_STATUS")=="COMPLETED"}</bpmn:conditionExpression>
35     </bpmn:sequenceFlow>
36     <bpmn:sequenceFlow id="SequenceFlow_12rysg7" name="Failed" sourceRef="ExclusiveGateway_1mxv8h6" targetRef="Task_073m8fr" />
37     <bpmn:sequenceFlow id="SequenceFlow_1ufwh0a" sourceRef="ReceiveTask_0otx1r1" targetRef="ExclusiveGateway_1mxv8h6" />
38     <bpmn:serviceTask id="Task_16o0qkj" name="Send Request" camunda:expression="${DeleteChildServiceBB.sendRequest(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
39       <bpmn:incoming>Flow_0b6onv7</bpmn:incoming>
40       <bpmn:incoming>Flow_0o9v00r</bpmn:incoming>
41       <bpmn:outgoing>SequenceFlow_14d89qf</bpmn:outgoing>
42     </bpmn:serviceTask>
43     <bpmn:serviceTask id="Task_073m8fr" name="Handle Failure" camunda:expression="${DeleteChildServiceBB.handleFailure(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
44       <bpmn:incoming>SequenceFlow_12rysg7</bpmn:incoming>
45     </bpmn:serviceTask>
46     <bpmn:sequenceFlow id="Flow_0zrdr8f" sourceRef="Activity_12vecw7" targetRef="Gateway_0ccysyj" />
47     <bpmn:serviceTask id="Activity_12vecw7" name="checkIfChildInstantiated" camunda:expression="${DeleteChildServiceBB.checkIfChildInstantiated(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
48       <bpmn:incoming>Flow_1a6111h</bpmn:incoming>
49       <bpmn:outgoing>Flow_0zrdr8f</bpmn:outgoing>
50     </bpmn:serviceTask>
51     <bpmn:exclusiveGateway id="Gateway_0ccysyj" default="Flow_046pbsy">
52       <bpmn:incoming>Flow_0zrdr8f</bpmn:incoming>
53       <bpmn:outgoing>Flow_0wfcckg</bpmn:outgoing>
54       <bpmn:outgoing>Flow_046pbsy</bpmn:outgoing>
55     </bpmn:exclusiveGateway>
56     <bpmn:sequenceFlow id="Flow_0wfcckg" name="false" sourceRef="Gateway_0ccysyj" targetRef="EndEvent_0fh7ikt">
57       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("CHILD_SVC_REQ_STATUS") == "fail" &amp;&amp; execution.getVariable("requestAction") == "createInstance" }</bpmn:conditionExpression>
58     </bpmn:sequenceFlow>
59     <bpmn:serviceTask id="Activity_0wymxwd" name="buildRequestRollBack" camunda:expression="${DeleteChildServiceBB.buildRequestRollBack(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
60       <bpmn:incoming>Flow_046pbsy</bpmn:incoming>
61       <bpmn:outgoing>Flow_0o9v00r</bpmn:outgoing>
62     </bpmn:serviceTask>
63     <bpmn:sequenceFlow id="Flow_046pbsy" sourceRef="Gateway_0ccysyj" targetRef="Activity_0wymxwd" />
64     <bpmn:sequenceFlow id="Flow_0b6onv7" sourceRef="Activity_0sa8znp" targetRef="Task_16o0qkj" />
65     <bpmn:serviceTask id="Activity_0sa8znp" name="buildRequest" camunda:expression="${DeleteChildServiceBB.buildRequest(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
66       <bpmn:incoming>Flow_168wu4x</bpmn:incoming>
67       <bpmn:outgoing>Flow_0b6onv7</bpmn:outgoing>
68     </bpmn:serviceTask>
69     <bpmn:exclusiveGateway id="Gateway_11mtcp5" default="Flow_1a6111h">
70       <bpmn:incoming>Flow_1j43din</bpmn:incoming>
71       <bpmn:outgoing>Flow_1a6111h</bpmn:outgoing>
72       <bpmn:outgoing>Flow_168wu4x</bpmn:outgoing>
73     </bpmn:exclusiveGateway>
74     <bpmn:sequenceFlow id="Flow_1a6111h" sourceRef="Gateway_11mtcp5" targetRef="Activity_12vecw7" />
75     <bpmn:sequenceFlow id="Flow_168wu4x" name="true" sourceRef="Gateway_11mtcp5" targetRef="Activity_0sa8znp">
76       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("requestAction") == "deleteInstance" }</bpmn:conditionExpression>
77     </bpmn:sequenceFlow>
78     <bpmn:sequenceFlow id="Flow_0o9v00r" sourceRef="Activity_0wymxwd" targetRef="Task_16o0qkj" />
79     <bpmn:sequenceFlow id="Flow_1j43din" sourceRef="Activity_078kmnt" targetRef="Gateway_11mtcp5" />
80     <bpmn:serviceTask id="Activity_078kmnt" name="setRequestAction" camunda:expression="${DeleteChildServiceBB.setRequestAction(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
81       <bpmn:incoming>SequenceFlow_01wirq3</bpmn:incoming>
82       <bpmn:outgoing>Flow_1j43din</bpmn:outgoing>
83     </bpmn:serviceTask>
84   </bpmn:process>
85   <bpmn:error id="Error_1d6c5q3" name="MSO Workflow Exception" errorCode="MSOWorkflowException" camunda:errorMessage="Child service deletion timeout reached" />
86   <bpmn:message id="Message_0xg6jua" name="ChildServiceRequest" />
87   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
88     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteChildServiceBB">
89       <bpmndi:BPMNEdge id="Flow_046pbsy_di" bpmnElement="Flow_046pbsy">
90         <di:waypoint x="765" y="250" />
91         <di:waypoint x="820" y="250" />
92         <bpmndi:BPMNLabel>
93           <dc:Bounds x="514" y="232" width="19" height="14" />
94         </bpmndi:BPMNLabel>
95       </bpmndi:BPMNEdge>
96       <bpmndi:BPMNEdge id="Flow_0wfcckg_di" bpmnElement="Flow_0wfcckg">
97         <di:waypoint x="740" y="275" />
98         <di:waypoint x="740" y="610" />
99         <di:waypoint x="1632" y="610" />
100         <bpmndi:BPMNLabel>
101           <dc:Bounds x="744" y="440" width="23" height="14" />
102         </bpmndi:BPMNLabel>
103       </bpmndi:BPMNEdge>
104       <bpmndi:BPMNEdge id="Flow_0zrdr8f_di" bpmnElement="Flow_0zrdr8f">
105         <di:waypoint x="670" y="250" />
106         <di:waypoint x="715" y="250" />
107       </bpmndi:BPMNEdge>
108       <bpmndi:BPMNEdge id="SequenceFlow_1ufwh0a_di" bpmnElement="SequenceFlow_1ufwh0a">
109         <di:waypoint x="1350" y="250" />
110         <di:waypoint x="1435" y="250" />
111       </bpmndi:BPMNEdge>
112       <bpmndi:BPMNEdge id="SequenceFlow_12rysg7_di" bpmnElement="SequenceFlow_12rysg7">
113         <di:waypoint x="1460" y="275" />
114         <di:waypoint x="1460" y="360" />
115         <bpmndi:BPMNLabel>
116           <dc:Bounds x="1464" y="303" width="31" height="14" />
117         </bpmndi:BPMNLabel>
118       </bpmndi:BPMNEdge>
119       <bpmndi:BPMNEdge id="SequenceFlow_0v4loyx_di" bpmnElement="SequenceFlow_0v4loyx">
120         <di:waypoint x="1485" y="250" />
121         <di:waypoint x="1650" y="250" />
122         <di:waypoint x="1650" y="592" />
123         <bpmndi:BPMNLabel>
124           <dc:Bounds x="1653" y="343" width="54" height="14" />
125         </bpmndi:BPMNLabel>
126       </bpmndi:BPMNEdge>
127       <bpmndi:BPMNEdge id="SequenceFlow_0o2ukb9_di" bpmnElement="SequenceFlow_0o2ukb9">
128         <di:waypoint x="1330" y="308" />
129         <di:waypoint x="1330" y="382" />
130       </bpmndi:BPMNEdge>
131       <bpmndi:BPMNEdge id="SequenceFlow_14d89qf_di" bpmnElement="SequenceFlow_14d89qf">
132         <di:waypoint x="1170" y="250" />
133         <di:waypoint x="1250" y="250" />
134       </bpmndi:BPMNEdge>
135       <bpmndi:BPMNEdge id="SequenceFlow_01wirq3_di" bpmnElement="SequenceFlow_01wirq3">
136         <di:waypoint x="158" y="250" />
137         <di:waypoint x="230" y="250" />
138       </bpmndi:BPMNEdge>
139       <bpmndi:BPMNEdge id="Flow_0b6onv7_di" bpmnElement="Flow_0b6onv7">
140         <di:waypoint x="610" y="90" />
141         <di:waypoint x="1120" y="90" />
142         <di:waypoint x="1120" y="210" />
143       </bpmndi:BPMNEdge>
144       <bpmndi:BPMNEdge id="Flow_1a6111h_di" bpmnElement="Flow_1a6111h">
145         <di:waypoint x="455" y="250" />
146         <di:waypoint x="570" y="250" />
147       </bpmndi:BPMNEdge>
148       <bpmndi:BPMNEdge id="Flow_168wu4x_di" bpmnElement="Flow_168wu4x">
149         <di:waypoint x="430" y="225" />
150         <di:waypoint x="430" y="90" />
151         <di:waypoint x="510" y="90" />
152         <bpmndi:BPMNLabel>
153           <dc:Bounds x="436" y="155" width="19" height="14" />
154         </bpmndi:BPMNLabel>
155       </bpmndi:BPMNEdge>
156       <bpmndi:BPMNEdge id="Flow_0o9v00r_di" bpmnElement="Flow_0o9v00r">
157         <di:waypoint x="920" y="250" />
158         <di:waypoint x="1070" y="250" />
159       </bpmndi:BPMNEdge>
160       <bpmndi:BPMNEdge id="Flow_1j43din_di" bpmnElement="Flow_1j43din">
161         <di:waypoint x="330" y="250" />
162         <di:waypoint x="405" y="250" />
163       </bpmndi:BPMNEdge>
164       <bpmndi:BPMNShape id="ReceiveTask_0otx1r1_di" bpmnElement="ReceiveTask_0otx1r1">
165         <dc:Bounds x="1250" y="210" width="100" height="80" />
166       </bpmndi:BPMNShape>
167       <bpmndi:BPMNShape id="EndEvent_02vkobe_di" bpmnElement="EndEvent_02vkobe">
168         <dc:Bounds x="1312" y="382" width="36" height="36" />
169       </bpmndi:BPMNShape>
170       <bpmndi:BPMNShape id="ExclusiveGateway_1mxv8h6_di" bpmnElement="ExclusiveGateway_1mxv8h6" isMarkerVisible="true">
171         <dc:Bounds x="1435" y="225" width="50" height="50" />
172         <bpmndi:BPMNLabel>
173           <dc:Bounds x="1425" y="195" width="71" height="27" />
174         </bpmndi:BPMNLabel>
175       </bpmndi:BPMNShape>
176       <bpmndi:BPMNShape id="EndEvent_0fh7ikt_di" bpmnElement="EndEvent_0fh7ikt">
177         <dc:Bounds x="1632" y="592" width="36" height="36" />
178       </bpmndi:BPMNShape>
179       <bpmndi:BPMNShape id="ServiceTask_0hkopiv_di" bpmnElement="Task_073m8fr">
180         <dc:Bounds x="1410" y="360" width="100" height="80" />
181       </bpmndi:BPMNShape>
182       <bpmndi:BPMNShape id="Activity_0pn7d7x_di" bpmnElement="Activity_12vecw7">
183         <dc:Bounds x="570" y="210" width="100" height="80" />
184       </bpmndi:BPMNShape>
185       <bpmndi:BPMNShape id="Gateway_0ccysyj_di" bpmnElement="Gateway_0ccysyj" isMarkerVisible="true">
186         <dc:Bounds x="715" y="225" width="50" height="50" />
187       </bpmndi:BPMNShape>
188       <bpmndi:BPMNShape id="ServiceTask_0o8psus_di" bpmnElement="Task_16o0qkj">
189         <dc:Bounds x="1070" y="210" width="100" height="80" />
190       </bpmndi:BPMNShape>
191       <bpmndi:BPMNShape id="Activity_02ruq9r_di" bpmnElement="Activity_0wymxwd">
192         <dc:Bounds x="820" y="210" width="100" height="80" />
193       </bpmndi:BPMNShape>
194       <bpmndi:BPMNShape id="Activity_071izs4_di" bpmnElement="Activity_0sa8znp">
195         <dc:Bounds x="510" y="50" width="100" height="80" />
196       </bpmndi:BPMNShape>
197       <bpmndi:BPMNShape id="Gateway_11mtcp5_di" bpmnElement="Gateway_11mtcp5" isMarkerVisible="true">
198         <dc:Bounds x="405" y="225" width="50" height="50" />
199       </bpmndi:BPMNShape>
200       <bpmndi:BPMNShape id="Activity_039e3io_di" bpmnElement="Activity_078kmnt">
201         <dc:Bounds x="230" y="210" width="100" height="80" />
202       </bpmndi:BPMNShape>
203       <bpmndi:BPMNShape id="StartEvent_1m5641e_di" bpmnElement="StartEvent_1m5641e">
204         <dc:Bounds x="122" y="232" width="36" height="36" />
205       </bpmndi:BPMNShape>
206       <bpmndi:BPMNShape id="BoundaryEvent_1f4g2g1_di" bpmnElement="BoundaryEvent_1f4g2g1">
207         <dc:Bounds x="1312" y="272" width="36" height="36" />
208         <bpmndi:BPMNLabel>
209           <dc:Bounds x="1350" y="303" width="41" height="14" />
210         </bpmndi:BPMNLabel>
211       </bpmndi:BPMNShape>
212     </bpmndi:BPMNPlane>
213   </bpmndi:BPMNDiagram>
214 </bpmn:definitions>