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.7.2">
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 <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" />
13 </bpmn:extensionElements>
14 <bpmn:incoming>SequenceFlow_19wuics</bpmn:incoming>
15 <bpmn:outgoing>SequenceFlow_01h9qmz</bpmn:outgoing>
17 <bpmn:sequenceFlow id="SequenceFlow_0rq4c5r" sourceRef="Start_ExecuteBuildingBlock" targetRef="Task_BBInputSetup" />
18 <bpmn:sequenceFlow id="SequenceFlow_0uzwjrq" sourceRef="Task_BBInputSetup" targetRef="StatusPolicy" />
19 <bpmn:serviceTask id="Task_BBInputSetup" name="BB Input Setup" camunda:expression="${BBInputSetup.execute(execution)}">
20 <bpmn:incoming>SequenceFlow_0rq4c5r</bpmn:incoming>
21 <bpmn:outgoing>SequenceFlow_0uzwjrq</bpmn:outgoing>
23 <bpmn:endEvent id="End_ExecuteBuildingBlock" name="end">
24 <bpmn:incoming>SequenceFlow_16lmcxp</bpmn:incoming>
26 <bpmn:sequenceFlow id="SequenceFlow_01h9qmz" sourceRef="Call_BBToExecute" targetRef="Task_PostValidate" />
27 <bpmn:sequenceFlow id="Continue" name="Continue" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_PreValidate" />
28 <bpmn:serviceTask id="StatusPolicy" name="StatusPolicy" camunda:expression="${OrchestrationStatusValidator.validateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
29 <bpmn:incoming>SequenceFlow_0uzwjrq</bpmn:incoming>
30 <bpmn:outgoing>SequenceFlow_0je0y25</bpmn:outgoing>
32 <bpmn:exclusiveGateway id="CheckOrchestrationStatusValidationResults" name="Check OrchestrationStatus Validation Results" default="Continue">
33 <bpmn:incoming>SequenceFlow_0je0y25</bpmn:incoming>
34 <bpmn:outgoing>Continue</bpmn:outgoing>
35 <bpmn:outgoing>SequenceFlow_1j0vskt</bpmn:outgoing>
36 </bpmn:exclusiveGateway>
37 <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" />
38 <bpmn:subProcess id="SubProcess_0tv8zda" name="Error Handling " triggeredByEvent="true">
39 <bpmn:startEvent id="StartEvent_0tmcs9g">
40 <bpmn:outgoing>SequenceFlow_09synl9</bpmn:outgoing>
41 <bpmn:errorEventDefinition camunda:errorCodeVariable="WorkflowExceptionCode" camunda:errorMessageVariable="WorkflowExceptionMessage" />
43 <bpmn:sequenceFlow id="SequenceFlow_09synl9" sourceRef="StartEvent_0tmcs9g" targetRef="Task_QueryRainyDayTable" />
44 <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,true)}">
45 <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming>
46 <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing>
48 <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y">
49 <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming>
50 <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing>
51 <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing>
52 </bpmn:exclusiveGateway>
53 <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer">
54 <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming>
55 <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing>
56 <bpmn:timerEventDefinition>
57 <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration>
58 </bpmn:timerEventDefinition>
59 </bpmn:intermediateCatchEvent>
60 <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?">
61 <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming>
62 <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing>
63 <bpmn:outgoing>SequenceFlow_0541bid</bpmn:outgoing>
64 </bpmn:exclusiveGateway>
65 <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}">
66 <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming>
67 <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing>
69 <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" />
70 <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" />
71 <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt">
72 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression>
74 <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" />
75 <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" />
76 <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer">
77 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<execution.getVariable("maxRetries")}]]></bpmn:conditionExpression>
79 <bpmn:endEvent id="EndEvent_0mvmk3i">
80 <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming>
82 <bpmn:endEvent id="EndEvent_1sez2lh" name="end">
83 <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming>
84 <bpmn:terminateEventDefinition />
86 <bpmn:sequenceFlow id="SequenceFlow_0541bid" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_QuerySecondaryPolicy" />
87 <bpmn:sequenceFlow id="SequenceFlow_12ps9at" sourceRef="Task_QuerySecondaryPolicy" targetRef="EndEvent_0ex9298" />
88 <bpmn:endEvent id="EndEvent_0ex9298" name="end">
89 <bpmn:incoming>SequenceFlow_12ps9at</bpmn:incoming>
91 <bpmn:serviceTask id="Task_QuerySecondaryPolicy" name="Query Secondary Policy" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,false)}">
92 <bpmn:incoming>SequenceFlow_0541bid</bpmn:incoming>
93 <bpmn:outgoing>SequenceFlow_12ps9at</bpmn:outgoing>
96 <bpmn:sequenceFlow id="SequenceFlow_16lmcxp" sourceRef="Task_setHandlingCodeSuccess" targetRef="End_ExecuteBuildingBlock" />
97 <bpmn:sequenceFlow id="SequenceFlow_1j0vskt" name="Silent Success" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_setHandlingCodeSuccess">
98 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("orchestrationStatusValidationResult").name() == "SILENT_SUCCESS"}]]></bpmn:conditionExpression>
100 <bpmn:serviceTask id="Task_setHandlingCodeSuccess" name="Set Handling Code To Success" camunda:expression="${ExecuteBuildingBlockRainyDay.setHandlingStatusSuccess(execution)}">
101 <bpmn:incoming>SequenceFlow_1j0vskt</bpmn:incoming>
102 <bpmn:incoming>SequenceFlow_12a4hhf</bpmn:incoming>
103 <bpmn:outgoing>SequenceFlow_16lmcxp</bpmn:outgoing>
105 <bpmn:sequenceFlow id="SequenceFlow_19wuics" sourceRef="Task_PreValidate" targetRef="Call_BBToExecute" />
106 <bpmn:sequenceFlow id="SequenceFlow_12a4hhf" sourceRef="Task_PostValidate" targetRef="Task_setHandlingCodeSuccess" />
107 <bpmn:serviceTask id="Task_PreValidate" name="PreValidate" camunda:expression="${BuildingBlockValidatorRunner.preValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
108 <bpmn:incoming>Continue</bpmn:incoming>
109 <bpmn:outgoing>SequenceFlow_19wuics</bpmn:outgoing>
111 <bpmn:serviceTask id="Task_PostValidate" name="PostValidate" camunda:expression="${BuildingBlockValidatorRunner.postValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
112 <bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming>
113 <bpmn:outgoing>SequenceFlow_12a4hhf</bpmn:outgoing>
116 <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" />
117 <bpmn:error id="Error_17zcdbk" name="Bpmn Error" />
118 <bpmn:error id="Error_123q3fr" name="Error_1h13m8l" />
119 <bpmn:error id="Error_1ivyybb" name="Error_1e4p3cf" />
120 <bpmn:error id="Error_1c60d7i" name="Error_0qrs661" />
121 <bpmn:error id="Error_1owi18u" name="Error_2eiqdl7" />
122 <bpmn:error id="Error_0snha16" />
123 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
124 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock">
125 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock">
126 <dc:Bounds x="111" y="162" width="36" height="36" />
128 <dc:Bounds x="119" y="198" width="22" height="12" />
131 <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute">
132 <dc:Bounds x="749" y="140" width="100" height="80" />
134 <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r">
135 <di:waypoint xsi:type="dc:Point" x="147" y="180" />
136 <di:waypoint xsi:type="dc:Point" x="184" y="180" />
138 <dc:Bounds x="120.5" y="165" width="90" height="0" />
141 <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq">
142 <di:waypoint xsi:type="dc:Point" x="284" y="180" />
143 <di:waypoint xsi:type="dc:Point" x="321" y="180" />
145 <dc:Bounds x="257.5" y="165" width="90" height="0" />
148 <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup">
149 <dc:Bounds x="184" y="140" width="100" height="80" />
151 <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock">
152 <dc:Bounds x="1221" y="162" width="36" height="36" />
154 <dc:Bounds x="1230" y="202" width="18" height="12" />
157 <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz">
158 <di:waypoint xsi:type="dc:Point" x="849" y="180" />
159 <di:waypoint xsi:type="dc:Point" x="906" y="180" />
161 <dc:Bounds x="832.5" y="159" width="90" height="12" />
164 <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true">
165 <dc:Bounds x="721" y="385" width="50" height="50" />
167 <dc:Bounds x="716" y="360" width="63" height="13" />
170 <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer">
171 <dc:Bounds x="965" y="392" width="36" height="36" />
173 <dc:Bounds x="956" y="367" width="55" height="13" />
176 <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true">
177 <dc:Bounds x="568" y="385" width="50" height="50" />
179 <dc:Bounds x="558" y="347" width="70" height="25" />
182 <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0">
183 <di:waypoint xsi:type="dc:Point" x="771" y="410" />
184 <di:waypoint xsi:type="dc:Point" x="836" y="410" />
186 <dc:Bounds x="788" y="385" width="18" height="13" />
189 <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva">
190 <di:waypoint xsi:type="dc:Point" x="618" y="410" />
191 <di:waypoint xsi:type="dc:Point" x="721" y="410" />
193 <dc:Bounds x="656" y="418" width="27" height="13" />
196 <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y">
197 <di:waypoint xsi:type="dc:Point" x="593" y="435" />
198 <di:waypoint xsi:type="dc:Point" x="593" y="491" />
200 <dc:Bounds x="600" y="456" width="85" height="13" />
203 <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable">
204 <dc:Bounds x="425" y="370" width="100" height="80" />
206 <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft">
207 <di:waypoint xsi:type="dc:Point" x="936" y="410" />
208 <di:waypoint xsi:type="dc:Point" x="965" y="410" />
210 <dc:Bounds x="906" y="389" width="90" height="12" />
213 <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc">
214 <di:waypoint xsi:type="dc:Point" x="1001" y="410" />
215 <di:waypoint xsi:type="dc:Point" x="1039" y="410" />
217 <dc:Bounds x="975" y="389" width="90" height="12" />
220 <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer">
221 <dc:Bounds x="836" y="370" width="100" height="80" />
223 <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue">
224 <di:waypoint xsi:type="dc:Point" x="508" y="180" />
225 <di:waypoint xsi:type="dc:Point" x="582" y="180" />
227 <dc:Bounds x="524.6653543307086" y="159" width="43" height="12" />
230 <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy">
231 <dc:Bounds x="321" y="140" width="100" height="80" />
233 <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true">
234 <dc:Bounds x="458" y="155" width="50" height="50" />
236 <dc:Bounds x="442" y="209" width="87" height="48" />
239 <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25">
240 <di:waypoint xsi:type="dc:Point" x="421" y="180" />
241 <di:waypoint xsi:type="dc:Point" x="458" y="180" />
243 <dc:Bounds x="394.5" y="159" width="90" height="12" />
246 <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c">
247 <di:waypoint xsi:type="dc:Point" x="525" y="410" />
248 <di:waypoint xsi:type="dc:Point" x="568" y="410" />
250 <dc:Bounds x="502" y="389" width="90" height="13" />
253 <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true">
254 <dc:Bounds x="320" y="294" width="802" height="290" />
256 <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g">
257 <dc:Bounds x="340" y="392" width="36" height="36" />
259 <dc:Bounds x="223" y="428" width="90" height="12" />
262 <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9">
263 <di:waypoint xsi:type="dc:Point" x="376" y="410" />
264 <di:waypoint xsi:type="dc:Point" x="425" y="410" />
266 <dc:Bounds x="356" y="389" width="90" height="12" />
269 <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i">
270 <dc:Bounds x="575" y="491" width="36" height="36" />
272 <dc:Bounds x="548" y="531" width="90" height="12" />
275 <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh">
276 <dc:Bounds x="1039" y="392" width="36" height="36" />
278 <dc:Bounds x="1049" y="432" width="19" height="13" />
281 <bpmndi:BPMNEdge id="SequenceFlow_16lmcxp_di" bpmnElement="SequenceFlow_16lmcxp">
282 <di:waypoint xsi:type="dc:Point" x="1163" y="180" />
283 <di:waypoint xsi:type="dc:Point" x="1221" y="180" />
285 <dc:Bounds x="1147" y="159" width="90" height="12" />
288 <bpmndi:BPMNEdge id="SequenceFlow_1j0vskt_di" bpmnElement="SequenceFlow_1j0vskt">
289 <di:waypoint xsi:type="dc:Point" x="483" y="155" />
290 <di:waypoint xsi:type="dc:Point" x="483" y="84" />
291 <di:waypoint xsi:type="dc:Point" x="1113" y="84" />
292 <di:waypoint xsi:type="dc:Point" x="1113" y="140" />
294 <dc:Bounds x="764.2235294117647" y="63" width="72" height="12" />
297 <bpmndi:BPMNShape id="ServiceTask_0z9izx5_di" bpmnElement="Task_setHandlingCodeSuccess">
298 <dc:Bounds x="1063" y="140" width="100" height="80" />
300 <bpmndi:BPMNEdge id="SequenceFlow_19wuics_di" bpmnElement="SequenceFlow_19wuics">
301 <di:waypoint xsi:type="dc:Point" x="682" y="180" />
302 <di:waypoint xsi:type="dc:Point" x="749" y="180" />
304 <dc:Bounds x="670.5" y="159" width="90" height="12" />
307 <bpmndi:BPMNEdge id="SequenceFlow_12a4hhf_di" bpmnElement="SequenceFlow_12a4hhf">
308 <di:waypoint xsi:type="dc:Point" x="1006" y="180" />
309 <di:waypoint xsi:type="dc:Point" x="1063" y="180" />
311 <dc:Bounds x="989.5" y="159" width="90" height="12" />
314 <bpmndi:BPMNShape id="ServiceTask_1pf5f6w_di" bpmnElement="Task_PreValidate">
315 <dc:Bounds x="582" y="140" width="100" height="80" />
317 <bpmndi:BPMNShape id="ServiceTask_02w4792_di" bpmnElement="Task_PostValidate">
318 <dc:Bounds x="906" y="140" width="100" height="80" />
320 <bpmndi:BPMNEdge id="SequenceFlow_0541bid_di" bpmnElement="SequenceFlow_0541bid">
321 <di:waypoint xsi:type="dc:Point" x="746" y="435" />
322 <di:waypoint xsi:type="dc:Point" x="746" y="459" />
324 <dc:Bounds x="757" y="436" width="13" height="13" />
327 <bpmndi:BPMNEdge id="SequenceFlow_12ps9at_di" bpmnElement="SequenceFlow_12ps9at">
328 <di:waypoint xsi:type="dc:Point" x="796" y="499" />
329 <di:waypoint xsi:type="dc:Point" x="868" y="499" />
331 <dc:Bounds x="787" y="478" width="90" height="12" />
334 <bpmndi:BPMNShape id="EndEvent_05vw85n_di" bpmnElement="EndEvent_0ex9298">
335 <dc:Bounds x="868" y="481" width="36" height="36" />
337 <dc:Bounds x="877" y="521" width="19" height="13" />
340 <bpmndi:BPMNShape id="ServiceTask_11f2c91_di" bpmnElement="Task_QuerySecondaryPolicy">
341 <dc:Bounds x="696" y="459" width="100" height="80" />
344 </bpmndi:BPMNDiagram>