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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
3 <bpmn:process id="ExecuteBuildingBlock" name="ExecuteBuildingBlock" isExecutable="true">
4 <bpmn:startEvent id="Start_ExecuteBuildingBlock" name="start">
5 <bpmn:outgoing>SequenceFlow_0rq4c5r</bpmn:outgoing>
7 <bpmn:callActivity id="Call_BBToExecute" name="BB to Execute" calledElement="${flowToBeCalled}">
8 <bpmn:extensionElements>
9 <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
10 <camunda:out source="WorkflowException" target="WorkflowException" />
11 <camunda:in source="mso-request-id" target="mso-request-id" />
12 </bpmn:extensionElements>
13 <bpmn:incoming>SequenceFlow_19wuics</bpmn:incoming>
14 <bpmn:outgoing>SequenceFlow_01h9qmz</bpmn:outgoing>
16 <bpmn:sequenceFlow id="SequenceFlow_0rq4c5r" sourceRef="Start_ExecuteBuildingBlock" targetRef="Task_BBInputSetup" />
17 <bpmn:sequenceFlow id="SequenceFlow_0uzwjrq" sourceRef="Task_BBInputSetup" targetRef="StatusPolicy" />
18 <bpmn:serviceTask id="Task_BBInputSetup" name="BB Input Setup" camunda:expression="${BBInputSetup.execute(execution)}">
19 <bpmn:incoming>SequenceFlow_0rq4c5r</bpmn:incoming>
20 <bpmn:outgoing>SequenceFlow_0uzwjrq</bpmn:outgoing>
22 <bpmn:endEvent id="End_ExecuteBuildingBlock" name="end">
23 <bpmn:incoming>SequenceFlow_16lmcxp</bpmn:incoming>
25 <bpmn:sequenceFlow id="SequenceFlow_01h9qmz" sourceRef="Call_BBToExecute" targetRef="Task_PostValidate" />
26 <bpmn:sequenceFlow id="Continue" name="Continue" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_PreValidate" />
27 <bpmn:serviceTask id="StatusPolicy" name="StatusPolicy" camunda:expression="${OrchestrationStatusValidator.validateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
28 <bpmn:incoming>SequenceFlow_0uzwjrq</bpmn:incoming>
29 <bpmn:outgoing>SequenceFlow_0je0y25</bpmn:outgoing>
31 <bpmn:exclusiveGateway id="CheckOrchestrationStatusValidationResults" name="Check OrchestrationStatus Validation Results" default="Continue">
32 <bpmn:incoming>SequenceFlow_0je0y25</bpmn:incoming>
33 <bpmn:outgoing>Continue</bpmn:outgoing>
34 <bpmn:outgoing>SequenceFlow_1j0vskt</bpmn:outgoing>
35 </bpmn:exclusiveGateway>
36 <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" />
37 <bpmn:subProcess id="SubProcess_0tv8zda" name="Error Handling " triggeredByEvent="true">
38 <bpmn:startEvent id="StartEvent_0tmcs9g">
39 <bpmn:outgoing>SequenceFlow_09synl9</bpmn:outgoing>
40 <bpmn:errorEventDefinition />
42 <bpmn:sequenceFlow id="SequenceFlow_09synl9" sourceRef="StartEvent_0tmcs9g" targetRef="Task_QueryRainyDayTable" />
43 <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,true)}">
44 <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming>
45 <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing>
47 <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y">
48 <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming>
49 <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing>
50 <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing>
51 </bpmn:exclusiveGateway>
52 <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer">
53 <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming>
54 <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing>
55 <bpmn:timerEventDefinition>
56 <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration>
57 </bpmn:timerEventDefinition>
58 </bpmn:intermediateCatchEvent>
59 <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?">
60 <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming>
61 <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing>
62 <bpmn:outgoing>SequenceFlow_0541bid</bpmn:outgoing>
63 </bpmn:exclusiveGateway>
64 <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}">
65 <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming>
66 <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing>
68 <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" />
69 <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" />
70 <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt">
71 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression>
73 <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" />
74 <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" />
75 <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer">
76 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression>
78 <bpmn:endEvent id="EndEvent_0mvmk3i">
79 <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming>
81 <bpmn:endEvent id="EndEvent_1sez2lh" name="end">
82 <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming>
83 <bpmn:terminateEventDefinition />
85 <bpmn:sequenceFlow id="SequenceFlow_0541bid" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_QuerySecondaryPolicy" />
86 <bpmn:sequenceFlow id="SequenceFlow_12ps9at" sourceRef="Task_QuerySecondaryPolicy" targetRef="EndEvent_0ex9298" />
87 <bpmn:endEvent id="EndEvent_0ex9298" name="end">
88 <bpmn:incoming>SequenceFlow_12ps9at</bpmn:incoming>
90 <bpmn:serviceTask id="Task_QuerySecondaryPolicy" name="Query Secondary Policy" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,false)}">
91 <bpmn:incoming>SequenceFlow_0541bid</bpmn:incoming>
92 <bpmn:outgoing>SequenceFlow_12ps9at</bpmn:outgoing>
95 <bpmn:sequenceFlow id="SequenceFlow_16lmcxp" sourceRef="Task_setHandlingCodeSuccess" targetRef="End_ExecuteBuildingBlock" />
96 <bpmn:sequenceFlow id="SequenceFlow_1j0vskt" name="Silent Success" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_setHandlingCodeSuccess">
97 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("orchestrationStatusValidationResult").name() == "SILENT_SUCCESS"}]]></bpmn:conditionExpression>
99 <bpmn:serviceTask id="Task_setHandlingCodeSuccess" name="Set Handling Code To Success" camunda:expression="${ExecuteBuildingBlockRainyDay.setHandlingStatusSuccess(execution)}">
100 <bpmn:incoming>SequenceFlow_1j0vskt</bpmn:incoming>
101 <bpmn:incoming>SequenceFlow_12a4hhf</bpmn:incoming>
102 <bpmn:outgoing>SequenceFlow_16lmcxp</bpmn:outgoing>
104 <bpmn:sequenceFlow id="SequenceFlow_19wuics" sourceRef="Task_PreValidate" targetRef="Call_BBToExecute" />
105 <bpmn:sequenceFlow id="SequenceFlow_12a4hhf" sourceRef="Task_PostValidate" targetRef="Task_setHandlingCodeSuccess" />
106 <bpmn:serviceTask id="Task_PreValidate" name="PreValidate" camunda:expression="${BuildingBlockValidatorRunner.preValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
107 <bpmn:incoming>Continue</bpmn:incoming>
108 <bpmn:outgoing>SequenceFlow_19wuics</bpmn:outgoing>
110 <bpmn:serviceTask id="Task_PostValidate" name="PostValidate" camunda:expression="${BuildingBlockValidatorRunner.postValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
111 <bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming>
112 <bpmn:outgoing>SequenceFlow_12a4hhf</bpmn:outgoing>
115 <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" />
116 <bpmn:error id="Error_17zcdbk" name="Bpmn Error" />
117 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
118 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock">
119 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock">
120 <dc:Bounds x="111" y="162" width="36" height="36" />
122 <dc:Bounds x="119" y="198" width="22" height="12" />
125 <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute">
126 <dc:Bounds x="749" y="140" width="100" height="80" />
128 <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r">
129 <di:waypoint xsi:type="dc:Point" x="147" y="180" />
130 <di:waypoint xsi:type="dc:Point" x="184" y="180" />
132 <dc:Bounds x="120.5" y="165" width="90" height="0" />
135 <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq">
136 <di:waypoint xsi:type="dc:Point" x="284" y="180" />
137 <di:waypoint xsi:type="dc:Point" x="321" y="180" />
139 <dc:Bounds x="257.5" y="165" width="90" height="0" />
142 <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup">
143 <dc:Bounds x="184" y="140" width="100" height="80" />
145 <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock">
146 <dc:Bounds x="1221" y="162" width="36" height="36" />
148 <dc:Bounds x="1230" y="202" width="18" height="12" />
151 <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz">
152 <di:waypoint xsi:type="dc:Point" x="849" y="180" />
153 <di:waypoint xsi:type="dc:Point" x="906" y="180" />
155 <dc:Bounds x="832.5" y="159" width="90" height="12" />
158 <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true">
159 <dc:Bounds x="724" y="367" width="50" height="50" />
161 <dc:Bounds x="719" y="342" width="62" height="12" />
164 <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer">
165 <dc:Bounds x="968" y="374" width="36" height="36" />
167 <dc:Bounds x="959" y="349" width="55" height="12" />
170 <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true">
171 <dc:Bounds x="571" y="367" width="50" height="50" />
173 <dc:Bounds x="562" y="329" width="68" height="24" />
176 <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0">
177 <di:waypoint xsi:type="dc:Point" x="774" y="392" />
178 <di:waypoint xsi:type="dc:Point" x="839" y="392" />
180 <dc:Bounds x="790.2777777777778" y="367" width="18" height="12" />
183 <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva">
184 <di:waypoint xsi:type="dc:Point" x="621" y="392" />
185 <di:waypoint xsi:type="dc:Point" x="724" y="392" />
187 <dc:Bounds x="659" y="400" width="27" height="12" />
190 <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y">
191 <di:waypoint xsi:type="dc:Point" x="596" y="417" />
192 <di:waypoint xsi:type="dc:Point" x="596" y="473" />
194 <dc:Bounds x="603" y="438" width="84" height="12" />
197 <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable">
198 <dc:Bounds x="428" y="352" width="100" height="80" />
200 <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft">
201 <di:waypoint xsi:type="dc:Point" x="939" y="392" />
202 <di:waypoint xsi:type="dc:Point" x="968" y="392" />
204 <dc:Bounds x="908.5" y="371" width="90" height="12" />
207 <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc">
208 <di:waypoint xsi:type="dc:Point" x="1004" y="392" />
209 <di:waypoint xsi:type="dc:Point" x="1042" y="392" />
211 <dc:Bounds x="978" y="371" width="90" height="12" />
214 <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer">
215 <dc:Bounds x="839" y="352" width="100" height="80" />
217 <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue">
218 <di:waypoint xsi:type="dc:Point" x="508" y="180" />
219 <di:waypoint xsi:type="dc:Point" x="582" y="180" />
221 <dc:Bounds x="524.6653543307086" y="159" width="43" height="12" />
224 <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy">
225 <dc:Bounds x="321" y="140" width="100" height="80" />
227 <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true">
228 <dc:Bounds x="458" y="155" width="50" height="50" />
230 <dc:Bounds x="442" y="209" width="87" height="48" />
233 <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25">
234 <di:waypoint xsi:type="dc:Point" x="421" y="180" />
235 <di:waypoint xsi:type="dc:Point" x="458" y="180" />
237 <dc:Bounds x="394.5" y="159" width="90" height="12" />
240 <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c">
241 <di:waypoint xsi:type="dc:Point" x="528" y="392" />
242 <di:waypoint xsi:type="dc:Point" x="571" y="392" />
244 <dc:Bounds x="505" y="371" width="90" height="13" />
247 <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true">
248 <dc:Bounds x="323" y="276" width="802" height="290" />
250 <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g">
251 <dc:Bounds x="343" y="374" width="36" height="36" />
253 <dc:Bounds x="226" y="410" width="90" height="12" />
256 <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9">
257 <di:waypoint xsi:type="dc:Point" x="379" y="392" />
258 <di:waypoint xsi:type="dc:Point" x="428" y="392" />
260 <dc:Bounds x="359" y="371" width="90" height="12" />
263 <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i">
264 <dc:Bounds x="578" y="473" width="36" height="36" />
266 <dc:Bounds x="551" y="513" width="90" height="12" />
269 <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh">
270 <dc:Bounds x="1042" y="374" width="36" height="36" />
272 <dc:Bounds x="1052" y="414" width="18" height="12" />
275 <bpmndi:BPMNEdge id="SequenceFlow_16lmcxp_di" bpmnElement="SequenceFlow_16lmcxp">
276 <di:waypoint xsi:type="dc:Point" x="1163" y="180" />
277 <di:waypoint xsi:type="dc:Point" x="1221" y="180" />
279 <dc:Bounds x="1147" y="159" width="90" height="12" />
282 <bpmndi:BPMNEdge id="SequenceFlow_1j0vskt_di" bpmnElement="SequenceFlow_1j0vskt">
283 <di:waypoint xsi:type="dc:Point" x="483" y="155" />
284 <di:waypoint xsi:type="dc:Point" x="483" y="84" />
285 <di:waypoint xsi:type="dc:Point" x="1113" y="84" />
286 <di:waypoint xsi:type="dc:Point" x="1113" y="140" />
288 <dc:Bounds x="764.2235294117647" y="63" width="72" height="12" />
291 <bpmndi:BPMNShape id="ServiceTask_0z9izx5_di" bpmnElement="Task_setHandlingCodeSuccess">
292 <dc:Bounds x="1063" y="140" width="100" height="80" />
294 <bpmndi:BPMNEdge id="SequenceFlow_19wuics_di" bpmnElement="SequenceFlow_19wuics">
295 <di:waypoint xsi:type="dc:Point" x="682" y="180" />
296 <di:waypoint xsi:type="dc:Point" x="749" y="180" />
298 <dc:Bounds x="670.5" y="159" width="90" height="12" />
301 <bpmndi:BPMNEdge id="SequenceFlow_12a4hhf_di" bpmnElement="SequenceFlow_12a4hhf">
302 <di:waypoint xsi:type="dc:Point" x="1006" y="180" />
303 <di:waypoint xsi:type="dc:Point" x="1063" y="180" />
305 <dc:Bounds x="989.5" y="159" width="90" height="12" />
308 <bpmndi:BPMNShape id="ServiceTask_1pf5f6w_di" bpmnElement="Task_PreValidate">
309 <dc:Bounds x="582" y="140" width="100" height="80" />
311 <bpmndi:BPMNShape id="ServiceTask_02w4792_di" bpmnElement="Task_PostValidate">
312 <dc:Bounds x="906" y="140" width="100" height="80" />
314 <bpmndi:BPMNEdge id="SequenceFlow_0541bid_di" bpmnElement="SequenceFlow_0541bid">
315 <di:waypoint xsi:type="dc:Point" x="749" y="417" />
316 <di:waypoint xsi:type="dc:Point" x="749" y="441" />
318 <dc:Bounds x="760" y="418" width="12" height="12" />
321 <bpmndi:BPMNEdge id="SequenceFlow_12ps9at_di" bpmnElement="SequenceFlow_12ps9at">
322 <di:waypoint xsi:type="dc:Point" x="799" y="481" />
323 <di:waypoint xsi:type="dc:Point" x="871" y="481" />
325 <dc:Bounds x="835" y="460" width="0" height="12" />
328 <bpmndi:BPMNShape id="EndEvent_05vw85n_di" bpmnElement="EndEvent_0ex9298">
329 <dc:Bounds x="871" y="463" width="36" height="36" />
331 <dc:Bounds x="880" y="503" width="18" height="12" />
334 <bpmndi:BPMNShape id="ServiceTask_11f2c91_di" bpmnElement="Task_QuerySecondaryPolicy">
335 <dc:Bounds x="699" y="441" width="100" height="80" />
338 </bpmndi:BPMNDiagram>