Enable long-running processes in ControllerExecutionBB
[so.git] / bpmn / so-bpmn-building-blocks / src / main / resources / subprocess / BuildingBlock / ControllerExecutionBB.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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.6.0">
3   <bpmn:process id="ControllerExecutionBB" name="ControllerExecutionBB" isExecutable="true">
4     <bpmn:startEvent id="StartEvent_1">
5       <bpmn:outgoing>SequenceFlow_0gmfit3</bpmn:outgoing>
6     </bpmn:startEvent>
7     <bpmn:sequenceFlow id="SequenceFlow_0gmfit3" sourceRef="StartEvent_1" targetRef="ServiceTask_0inxg9l" />
8     <bpmn:endEvent id="EndEvent_0lgvk82">
9       <bpmn:incoming>SequenceFlow_1mkhog2</bpmn:incoming>
10       <bpmn:incoming>Flow_0qmjpxv</bpmn:incoming>
11     </bpmn:endEvent>
12     <bpmn:sequenceFlow id="SequenceFlow_1mkhog2" sourceRef="Task_1hs1mn0" targetRef="EndEvent_0lgvk82" />
13     <bpmn:serviceTask id="Task_1hs1mn0" name="Update AAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), execution.getVariable(&#34;scope&#34;), execution.getVariable(&#34;action&#34;))}">
14       <bpmn:incoming>SequenceFlow_07tqu82</bpmn:incoming>
15       <bpmn:outgoing>SequenceFlow_1mkhog2</bpmn:outgoing>
16     </bpmn:serviceTask>
17     <bpmn:sequenceFlow id="SequenceFlow_05qembo" sourceRef="Task_0bhf6tp" targetRef="ReceiveTask_0gwz54h" />
18     <bpmn:serviceTask id="Task_0bhf6tp" name="Call ControllerExecutionBB" camunda:expression="${ControllerExecutionBB.execute(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
19       <bpmn:incoming>SequenceFlow_0vzx2yr</bpmn:incoming>
20       <bpmn:outgoing>SequenceFlow_05qembo</bpmn:outgoing>
21     </bpmn:serviceTask>
22     <bpmn:exclusiveGateway id="ExclusiveGateway_13q340y" default="SequenceFlow_1szkurj">
23       <bpmn:incoming>SequenceFlow_01kp408</bpmn:incoming>
24       <bpmn:outgoing>SequenceFlow_07tqu82</bpmn:outgoing>
25       <bpmn:outgoing>SequenceFlow_1szkurj</bpmn:outgoing>
26     </bpmn:exclusiveGateway>
27     <bpmn:sequenceFlow id="SequenceFlow_07tqu82" name="successCDS" sourceRef="ExclusiveGateway_13q340y" targetRef="Task_1hs1mn0">
28       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("ControllerStatus").equals("Success")}</bpmn:conditionExpression>
29     </bpmn:sequenceFlow>
30     <bpmn:serviceTask id="ServiceTask_0inxg9l" name="Set Actor, Scope and Action Params" camunda:expression="${ControllerExecution.setControllerActorScopeAction(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
31       <bpmn:incoming>SequenceFlow_0gmfit3</bpmn:incoming>
32       <bpmn:outgoing>SequenceFlow_1lspfyy</bpmn:outgoing>
33     </bpmn:serviceTask>
34     <bpmn:exclusiveGateway id="ExclusiveGateway_0plxwkg" default="SequenceFlow_1t7hs4k">
35       <bpmn:incoming>SequenceFlow_1lspfyy</bpmn:incoming>
36       <bpmn:outgoing>SequenceFlow_1t7hs4k</bpmn:outgoing>
37       <bpmn:outgoing>SequenceFlow_0vzx2yr</bpmn:outgoing>
38     </bpmn:exclusiveGateway>
39     <bpmn:sequenceFlow id="SequenceFlow_1lspfyy" sourceRef="ServiceTask_0inxg9l" targetRef="ExclusiveGateway_0plxwkg" />
40     <bpmn:callActivity id="BBToExecute" name="BB to Execute&#10;" calledElement="${bbName}">
41       <bpmn:extensionElements>
42         <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
43         <camunda:out source="WorkflowException" target="WorkflowException" />
44         <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" />
45         <camunda:out source="ControllerStatus" target="ControllerStatus" />
46         <camunda:in source="executionObject" target="executionObject" />
47         <camunda:in source="mso-request-id" target="mso-request-id" />
48         <camunda:in source="isRollback" target="isRollback" />
49         <camunda:out source="StatusMessage" target="StatusMessage" />
50       </bpmn:extensionElements>
51       <bpmn:incoming>SequenceFlow_0fv03vt</bpmn:incoming>
52       <bpmn:outgoing>SequenceFlow_0no1qag</bpmn:outgoing>
53     </bpmn:callActivity>
54     <bpmn:sequenceFlow id="SequenceFlow_1t7hs4k" sourceRef="ExclusiveGateway_0plxwkg" targetRef="Task_1rc2j9" />
55     <bpmn:sequenceFlow id="SequenceFlow_0no1qag" sourceRef="BBToExecute" targetRef="Gateway_065nxpu" />
56     <bpmn:sequenceFlow id="SequenceFlow_0fv03vt" sourceRef="Task_1rc2j9" targetRef="BBToExecute" />
57     <bpmn:serviceTask id="Task_1rc2j9" name="select BB " camunda:expression="${ControllerExecution.selectBB(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
58       <bpmn:incoming>SequenceFlow_1t7hs4k</bpmn:incoming>
59       <bpmn:outgoing>SequenceFlow_0fv03vt</bpmn:outgoing>
60     </bpmn:serviceTask>
61     <bpmn:endEvent id="EndEvent_1lxwuh2">
62       <bpmn:incoming>SequenceFlow_0op5irz</bpmn:incoming>
63       <bpmn:errorEventDefinition id="ErrorEventDefinition_0z001cu" errorRef="Error_0aovtfv" />
64     </bpmn:endEvent>
65     <bpmn:sequenceFlow id="SequenceFlow_0op5irz" sourceRef="Gateway_065nxpu" targetRef="EndEvent_1lxwuh2" />
66     <bpmn:sequenceFlow id="SequenceFlow_0vzx2yr" name="Actor= CDS" sourceRef="ExclusiveGateway_0plxwkg" targetRef="Task_0bhf6tp">
67       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("actor") == "CDS"}</bpmn:conditionExpression>
68     </bpmn:sequenceFlow>
69     <bpmn:exclusiveGateway id="Gateway_065nxpu" default="SequenceFlow_0op5irz">
70       <bpmn:incoming>SequenceFlow_0no1qag</bpmn:incoming>
71       <bpmn:outgoing>SequenceFlow_0op5irz</bpmn:outgoing>
72       <bpmn:outgoing>Flow_0qmjpxv</bpmn:outgoing>
73     </bpmn:exclusiveGateway>
74     <bpmn:sequenceFlow id="Flow_0qmjpxv" name="success" sourceRef="Gateway_065nxpu" targetRef="EndEvent_0lgvk82">
75       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("ControllerStatus").equals("Success")}</bpmn:conditionExpression>
76     </bpmn:sequenceFlow>
77     <bpmn:receiveTask id="ReceiveTask_0gwz54h" name="Wait for Controller Message" camunda:asyncAfter="true" messageRef="Message_01gofle">
78       <bpmn:incoming>SequenceFlow_05qembo</bpmn:incoming>
79       <bpmn:outgoing>SequenceFlow_01kp408</bpmn:outgoing>
80     </bpmn:receiveTask>
81     <bpmn:boundaryEvent id="BoundaryEvent_0nkal4w" name="Timeout" attachedToRef="ReceiveTask_0gwz54h">
82       <bpmn:extensionElements>
83         <camunda:executionListener expression="#{execution.setVariable(&#34;controllerMessageTimeoutReached&#34;, true)}" event="start" />
84       </bpmn:extensionElements>
85       <bpmn:outgoing>SequenceFlow_13ddk47</bpmn:outgoing>
86       <bpmn:timerEventDefinition id="TimerEventDefinition_14lr1mm">
87         <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">#{execution.getVariable("timeoutControllerMessage")}</bpmn:timeDuration>
88       </bpmn:timerEventDefinition>
89     </bpmn:boundaryEvent>
90     <bpmn:serviceTask id="ServiceTask_0t0bo1j" name="Handle Failure" camunda:expression="${ControllerExecutionBB.handleFailure(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
91       <bpmn:incoming>SequenceFlow_1szkurj</bpmn:incoming>
92       <bpmn:incoming>SequenceFlow_13ddk47</bpmn:incoming>
93     </bpmn:serviceTask>
94     <bpmn:sequenceFlow id="SequenceFlow_1szkurj" sourceRef="ExclusiveGateway_13q340y" targetRef="ServiceTask_0t0bo1j" />
95     <bpmn:sequenceFlow id="SequenceFlow_13ddk47" sourceRef="BoundaryEvent_0nkal4w" targetRef="ServiceTask_0t0bo1j" />
96     <bpmn:sequenceFlow id="SequenceFlow_01kp408" sourceRef="ReceiveTask_0gwz54h" targetRef="ExclusiveGateway_13q340y" />
97   </bpmn:process>
98   <bpmn:error id="Error_0aovtfv" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
99   <bpmn:message id="Message_01gofle" name="ControllerMessage" />
100   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
101     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ControllerExecutionBB">
102       <bpmndi:BPMNEdge id="Flow_0qmjpxv_di" bpmnElement="Flow_0qmjpxv">
103         <di:waypoint x="1147" y="233" />
104         <di:waypoint x="1147" y="323" />
105         <bpmndi:BPMNLabel>
106           <dc:Bounds x="1170" y="263" width="41" height="14" />
107         </bpmndi:BPMNLabel>
108       </bpmndi:BPMNEdge>
109       <bpmndi:BPMNEdge id="SequenceFlow_0vzx2yr_di" bpmnElement="SequenceFlow_0vzx2yr">
110         <di:waypoint x="424" y="366" />
111         <di:waypoint x="424" y="462" />
112         <di:waypoint x="520" y="462" />
113         <bpmndi:BPMNLabel>
114           <dc:Bounds x="434" y="436" width="59" height="14" />
115         </bpmndi:BPMNLabel>
116       </bpmndi:BPMNEdge>
117       <bpmndi:BPMNEdge id="SequenceFlow_0op5irz_di" bpmnElement="SequenceFlow_0op5irz">
118         <di:waypoint x="1147" y="183" />
119         <di:waypoint x="1147" y="128" />
120         <bpmndi:BPMNLabel>
121           <dc:Bounds x="739" y="58" width="0" height="12" />
122         </bpmndi:BPMNLabel>
123       </bpmndi:BPMNEdge>
124       <bpmndi:BPMNEdge id="SequenceFlow_0fv03vt_di" bpmnElement="SequenceFlow_0fv03vt">
125         <di:waypoint x="672" y="208" />
126         <di:waypoint x="824" y="208" />
127         <bpmndi:BPMNLabel>
128           <dc:Bounds x="598" y="107" width="0" height="12" />
129         </bpmndi:BPMNLabel>
130       </bpmndi:BPMNEdge>
131       <bpmndi:BPMNEdge id="SequenceFlow_0no1qag_di" bpmnElement="SequenceFlow_0no1qag">
132         <di:waypoint x="924" y="208" />
133         <di:waypoint x="1122" y="208" />
134         <bpmndi:BPMNLabel>
135           <dc:Bounds x="840.5" y="107" width="90" height="12" />
136         </bpmndi:BPMNLabel>
137       </bpmndi:BPMNEdge>
138       <bpmndi:BPMNEdge id="SequenceFlow_1t7hs4k_di" bpmnElement="SequenceFlow_1t7hs4k">
139         <di:waypoint x="424" y="316" />
140         <di:waypoint x="424" y="208" />
141         <di:waypoint x="572" y="208" />
142         <bpmndi:BPMNLabel>
143           <dc:Bounds x="271" y="89" width="83" height="36" />
144         </bpmndi:BPMNLabel>
145       </bpmndi:BPMNEdge>
146       <bpmndi:BPMNEdge id="SequenceFlow_1lspfyy_di" bpmnElement="SequenceFlow_1lspfyy">
147         <di:waypoint x="359" y="341" />
148         <di:waypoint x="399" y="341" />
149         <bpmndi:BPMNLabel>
150           <dc:Bounds x="229" y="240" width="0" height="12" />
151         </bpmndi:BPMNLabel>
152       </bpmndi:BPMNEdge>
153       <bpmndi:BPMNEdge id="SequenceFlow_07tqu82_di" bpmnElement="SequenceFlow_07tqu82">
154         <di:waypoint x="918" y="462" />
155         <di:waypoint x="979" y="462" />
156         <bpmndi:BPMNLabel>
157           <dc:Bounds x="908" y="443" width="64" height="14" />
158         </bpmndi:BPMNLabel>
159       </bpmndi:BPMNEdge>
160       <bpmndi:BPMNEdge id="SequenceFlow_05qembo_di" bpmnElement="SequenceFlow_05qembo">
161         <di:waypoint x="620" y="462" />
162         <di:waypoint x="690" y="462" />
163         <bpmndi:BPMNLabel>
164           <dc:Bounds x="725" y="437" width="90" height="20" />
165         </bpmndi:BPMNLabel>
166       </bpmndi:BPMNEdge>
167       <bpmndi:BPMNEdge id="SequenceFlow_1mkhog2_di" bpmnElement="SequenceFlow_1mkhog2">
168         <di:waypoint x="1079" y="462" />
169         <di:waypoint x="1147" y="462" />
170         <di:waypoint x="1147" y="359" />
171         <bpmndi:BPMNLabel>
172           <dc:Bounds x="918" y="357" width="90" height="20" />
173         </bpmndi:BPMNLabel>
174       </bpmndi:BPMNEdge>
175       <bpmndi:BPMNEdge id="SequenceFlow_0gmfit3_di" bpmnElement="SequenceFlow_0gmfit3">
176         <di:waypoint x="196" y="341" />
177         <di:waypoint x="259" y="341" />
178         <bpmndi:BPMNLabel>
179           <dc:Bounds x="32.5" y="236" width="90" height="20" />
180         </bpmndi:BPMNLabel>
181       </bpmndi:BPMNEdge>
182       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
183         <dc:Bounds x="160" y="323" width="36" height="36" />
184         <bpmndi:BPMNLabel>
185           <dc:Bounds x="-17" y="279" width="90" height="20" />
186         </bpmndi:BPMNLabel>
187       </bpmndi:BPMNShape>
188       <bpmndi:BPMNShape id="EndEvent_0lgvk82_di" bpmnElement="EndEvent_0lgvk82">
189         <dc:Bounds x="1129" y="323" width="36" height="36" />
190         <bpmndi:BPMNLabel>
191           <dc:Bounds x="1025" y="251" width="90" height="20" />
192         </bpmndi:BPMNLabel>
193       </bpmndi:BPMNShape>
194       <bpmndi:BPMNShape id="ServiceTask_0404s6a_di" bpmnElement="Task_1hs1mn0">
195         <dc:Bounds x="979" y="422" width="100" height="80" />
196       </bpmndi:BPMNShape>
197       <bpmndi:BPMNShape id="ServiceTask_01mv1si_di" bpmnElement="Task_0bhf6tp">
198         <dc:Bounds x="520" y="422" width="100" height="80" />
199       </bpmndi:BPMNShape>
200       <bpmndi:BPMNShape id="ExclusiveGateway_13q340y_di" bpmnElement="ExclusiveGateway_13q340y" isMarkerVisible="true">
201         <dc:Bounds x="868" y="437" width="50" height="50" />
202         <bpmndi:BPMNLabel>
203           <dc:Bounds x="698" y="327" width="90" height="20" />
204         </bpmndi:BPMNLabel>
205       </bpmndi:BPMNShape>
206       <bpmndi:BPMNShape id="ServiceTask_0inxg9l_di" bpmnElement="ServiceTask_0inxg9l">
207         <dc:Bounds x="259" y="301" width="100" height="80" />
208       </bpmndi:BPMNShape>
209       <bpmndi:BPMNShape id="ExclusiveGateway_0plxwkg_di" bpmnElement="ExclusiveGateway_0plxwkg" isMarkerVisible="true">
210         <dc:Bounds x="399" y="316" width="50" height="50" />
211         <bpmndi:BPMNLabel>
212           <dc:Bounds x="309" y="255" width="0" height="12" />
213         </bpmndi:BPMNLabel>
214       </bpmndi:BPMNShape>
215       <bpmndi:BPMNShape id="CallActivity_01dem38_di" bpmnElement="BBToExecute">
216         <dc:Bounds x="824" y="168" width="100" height="80" />
217       </bpmndi:BPMNShape>
218       <bpmndi:BPMNShape id="ServiceTask_0qd9p4w_di" bpmnElement="Task_1rc2j9">
219         <dc:Bounds x="572" y="168" width="100" height="80" />
220       </bpmndi:BPMNShape>
221       <bpmndi:BPMNShape id="EndEvent_1lxwuh2_di" bpmnElement="EndEvent_1lxwuh2">
222         <dc:Bounds x="1129" y="92" width="36" height="36" />
223         <bpmndi:BPMNLabel>
224           <dc:Bounds x="679" y="50" width="0" height="12" />
225         </bpmndi:BPMNLabel>
226       </bpmndi:BPMNShape>
227       <bpmndi:BPMNShape id="Gateway_065nxpu_di" bpmnElement="Gateway_065nxpu" isMarkerVisible="true">
228         <dc:Bounds x="1122" y="183" width="50" height="50" />
229       </bpmndi:BPMNShape>
230       <bpmndi:BPMNShape id="ReceiveTask_0gwz54h_di" bpmnElement="ReceiveTask_0gwz54h">
231         <dc:Bounds x="690" y="422" width="100" height="80" />
232       </bpmndi:BPMNShape>
233       <bpmndi:BPMNShape id="BoundaryEvent_0nkal4w_di" bpmnElement="BoundaryEvent_0nkal4w">
234         <dc:Bounds x="722" y="484" width="36" height="36" />
235         <bpmndi:BPMNLabel>
236           <dc:Bounds x="750" y="523" width="40" height="14" />
237         </bpmndi:BPMNLabel>
238       </bpmndi:BPMNShape>
239       <bpmndi:BPMNShape id="ServiceTask_0t0bo1j_di" bpmnElement="ServiceTask_0t0bo1j">
240         <dc:Bounds x="843" y="580" width="100" height="80" />
241       </bpmndi:BPMNShape>
242       <bpmndi:BPMNEdge id="SequenceFlow_1szkurj_di" bpmnElement="SequenceFlow_1szkurj">
243         <di:waypoint x="893" y="487" />
244         <di:waypoint x="893" y="580" />
245       </bpmndi:BPMNEdge>
246       <bpmndi:BPMNEdge id="SequenceFlow_13ddk47_di" bpmnElement="SequenceFlow_13ddk47">
247         <di:waypoint x="740" y="520" />
248         <di:waypoint x="740" y="620" />
249         <di:waypoint x="843" y="620" />
250       </bpmndi:BPMNEdge>
251       <bpmndi:BPMNEdge id="SequenceFlow_01kp408_di" bpmnElement="SequenceFlow_01kp408">
252         <di:waypoint x="790" y="462" />
253         <di:waypoint x="868" y="462" />
254       </bpmndi:BPMNEdge>
255     </bpmndi:BPMNPlane>
256   </bpmndi:BPMNDiagram>
257 </bpmn:definitions>