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.8.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 </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 camunda:errorCodeVariable="WorkflowExceptionCode" camunda:errorMessageVariable="WorkflowExceptionMessage" />
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")<execution.getVariable("maxRetries")}]]></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 <bpmn:error id="Error_123q3fr" name="Error_1h13m8l" />
118 <bpmn:error id="Error_1ivyybb" name="Error_1e4p3cf" />
119 <bpmn:error id="Error_1c60d7i" name="Error_0qrs661" />
120 <bpmn:error id="Error_1owi18u" name="Error_2eiqdl7" />
121 <bpmn:error id="Error_0snha16" />
122 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
123 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock">
124 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock">
125 <dc:Bounds x="111" y="162" width="36" height="36" />
127 <dc:Bounds x="119" y="198" width="22" height="12" />
130 <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute">
131 <dc:Bounds x="749" y="140" width="100" height="80" />
133 <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r">
134 <di:waypoint xsi:type="dc:Point" x="147" y="180" />
135 <di:waypoint xsi:type="dc:Point" x="184" y="180" />
137 <dc:Bounds x="120.5" y="165" width="90" height="0" />
140 <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq">
141 <di:waypoint xsi:type="dc:Point" x="284" y="180" />
142 <di:waypoint xsi:type="dc:Point" x="321" y="180" />
144 <dc:Bounds x="257.5" y="165" width="90" height="0" />
147 <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup">
148 <dc:Bounds x="184" y="140" width="100" height="80" />
150 <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock">
151 <dc:Bounds x="1221" y="162" width="36" height="36" />
153 <dc:Bounds x="1230" y="202" width="18" height="12" />
156 <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz">
157 <di:waypoint xsi:type="dc:Point" x="849" y="180" />
158 <di:waypoint xsi:type="dc:Point" x="906" y="180" />
160 <dc:Bounds x="832.5" y="159" width="90" height="12" />
163 <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true">
164 <dc:Bounds x="721" y="385" width="50" height="50" />
166 <dc:Bounds x="716" y="360" width="63" height="13" />
169 <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer">
170 <dc:Bounds x="965" y="392" width="36" height="36" />
172 <dc:Bounds x="956" y="367" width="55" height="13" />
175 <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true">
176 <dc:Bounds x="568" y="385" width="50" height="50" />
178 <dc:Bounds x="558" y="347" width="70" height="25" />
181 <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0">
182 <di:waypoint xsi:type="dc:Point" x="771" y="410" />
183 <di:waypoint xsi:type="dc:Point" x="836" y="410" />
185 <dc:Bounds x="788" y="385" width="18" height="13" />
188 <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva">
189 <di:waypoint xsi:type="dc:Point" x="618" y="410" />
190 <di:waypoint xsi:type="dc:Point" x="721" y="410" />
192 <dc:Bounds x="656" y="418" width="27" height="13" />
195 <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y">
196 <di:waypoint xsi:type="dc:Point" x="593" y="435" />
197 <di:waypoint xsi:type="dc:Point" x="593" y="491" />
199 <dc:Bounds x="600" y="456" width="85" height="13" />
202 <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable">
203 <dc:Bounds x="425" y="370" width="100" height="80" />
205 <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft">
206 <di:waypoint xsi:type="dc:Point" x="936" y="410" />
207 <di:waypoint xsi:type="dc:Point" x="965" y="410" />
209 <dc:Bounds x="906" y="389" width="90" height="12" />
212 <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc">
213 <di:waypoint xsi:type="dc:Point" x="1001" y="410" />
214 <di:waypoint xsi:type="dc:Point" x="1039" y="410" />
216 <dc:Bounds x="975" y="389" width="90" height="12" />
219 <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer">
220 <dc:Bounds x="836" y="370" width="100" height="80" />
222 <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue">
223 <di:waypoint xsi:type="dc:Point" x="508" y="180" />
224 <di:waypoint xsi:type="dc:Point" x="582" y="180" />
226 <dc:Bounds x="524.6653543307086" y="159" width="43" height="12" />
229 <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy">
230 <dc:Bounds x="321" y="140" width="100" height="80" />
232 <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true">
233 <dc:Bounds x="458" y="155" width="50" height="50" />
235 <dc:Bounds x="442" y="209" width="87" height="48" />
238 <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25">
239 <di:waypoint xsi:type="dc:Point" x="421" y="180" />
240 <di:waypoint xsi:type="dc:Point" x="458" y="180" />
242 <dc:Bounds x="394.5" y="159" width="90" height="12" />
245 <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c">
246 <di:waypoint xsi:type="dc:Point" x="525" y="410" />
247 <di:waypoint xsi:type="dc:Point" x="568" y="410" />
249 <dc:Bounds x="502" y="389" width="90" height="13" />
252 <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true">
253 <dc:Bounds x="320" y="294" width="802" height="290" />
255 <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g">
256 <dc:Bounds x="340" y="392" width="36" height="36" />
258 <dc:Bounds x="223" y="428" width="90" height="12" />
261 <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9">
262 <di:waypoint xsi:type="dc:Point" x="376" y="410" />
263 <di:waypoint xsi:type="dc:Point" x="425" y="410" />
265 <dc:Bounds x="356" y="389" width="90" height="12" />
268 <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i">
269 <dc:Bounds x="575" y="491" width="36" height="36" />
271 <dc:Bounds x="548" y="531" width="90" height="12" />
274 <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh">
275 <dc:Bounds x="1039" y="392" width="36" height="36" />
277 <dc:Bounds x="1049" y="432" width="19" height="13" />
280 <bpmndi:BPMNEdge id="SequenceFlow_16lmcxp_di" bpmnElement="SequenceFlow_16lmcxp">
281 <di:waypoint xsi:type="dc:Point" x="1163" y="180" />
282 <di:waypoint xsi:type="dc:Point" x="1221" y="180" />
284 <dc:Bounds x="1147" y="159" width="90" height="12" />
287 <bpmndi:BPMNEdge id="SequenceFlow_1j0vskt_di" bpmnElement="SequenceFlow_1j0vskt">
288 <di:waypoint xsi:type="dc:Point" x="483" y="155" />
289 <di:waypoint xsi:type="dc:Point" x="483" y="84" />
290 <di:waypoint xsi:type="dc:Point" x="1113" y="84" />
291 <di:waypoint xsi:type="dc:Point" x="1113" y="140" />
293 <dc:Bounds x="764.2235294117647" y="63" width="72" height="12" />
296 <bpmndi:BPMNShape id="ServiceTask_0z9izx5_di" bpmnElement="Task_setHandlingCodeSuccess">
297 <dc:Bounds x="1063" y="140" width="100" height="80" />
299 <bpmndi:BPMNEdge id="SequenceFlow_19wuics_di" bpmnElement="SequenceFlow_19wuics">
300 <di:waypoint xsi:type="dc:Point" x="682" y="180" />
301 <di:waypoint xsi:type="dc:Point" x="749" y="180" />
303 <dc:Bounds x="670.5" y="159" width="90" height="12" />
306 <bpmndi:BPMNEdge id="SequenceFlow_12a4hhf_di" bpmnElement="SequenceFlow_12a4hhf">
307 <di:waypoint xsi:type="dc:Point" x="1006" y="180" />
308 <di:waypoint xsi:type="dc:Point" x="1063" y="180" />
310 <dc:Bounds x="989.5" y="159" width="90" height="12" />
313 <bpmndi:BPMNShape id="ServiceTask_1pf5f6w_di" bpmnElement="Task_PreValidate">
314 <dc:Bounds x="582" y="140" width="100" height="80" />
316 <bpmndi:BPMNShape id="ServiceTask_02w4792_di" bpmnElement="Task_PostValidate">
317 <dc:Bounds x="906" y="140" width="100" height="80" />
319 <bpmndi:BPMNEdge id="SequenceFlow_0541bid_di" bpmnElement="SequenceFlow_0541bid">
320 <di:waypoint xsi:type="dc:Point" x="746" y="435" />
321 <di:waypoint xsi:type="dc:Point" x="746" y="459" />
323 <dc:Bounds x="757" y="436" width="13" height="13" />
326 <bpmndi:BPMNEdge id="SequenceFlow_12ps9at_di" bpmnElement="SequenceFlow_12ps9at">
327 <di:waypoint xsi:type="dc:Point" x="796" y="499" />
328 <di:waypoint xsi:type="dc:Point" x="868" y="499" />
330 <dc:Bounds x="787" y="478" width="90" height="12" />
333 <bpmndi:BPMNShape id="EndEvent_05vw85n_di" bpmnElement="EndEvent_0ex9298">
334 <dc:Bounds x="868" y="481" width="36" height="36" />
336 <dc:Bounds x="877" y="521" width="19" height="13" />
339 <bpmndi:BPMNShape id="ServiceTask_11f2c91_di" bpmnElement="Task_QuerySecondaryPolicy">
340 <dc:Bounds x="696" y="459" width="100" height="80" />
343 </bpmndi:BPMNDiagram>