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 <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" />
13 <camunda:out source="StatusMessage" target="StatusMessage" />
14 </bpmn:extensionElements>
15 <bpmn:incoming>SequenceFlow_19wuics</bpmn:incoming>
16 <bpmn:outgoing>SequenceFlow_01h9qmz</bpmn:outgoing>
18 <bpmn:sequenceFlow id="SequenceFlow_0rq4c5r" sourceRef="Start_ExecuteBuildingBlock" targetRef="Task_BBInputSetup" />
19 <bpmn:sequenceFlow id="SequenceFlow_0uzwjrq" sourceRef="Task_BBInputSetup" targetRef="StatusPolicy" />
20 <bpmn:serviceTask id="Task_BBInputSetup" name="BB Input Setup" camunda:expression="${BBInputSetup.execute(execution)}">
21 <bpmn:incoming>SequenceFlow_0rq4c5r</bpmn:incoming>
22 <bpmn:outgoing>SequenceFlow_0uzwjrq</bpmn:outgoing>
24 <bpmn:endEvent id="End_ExecuteBuildingBlock" name="end">
25 <bpmn:incoming>SequenceFlow_16lmcxp</bpmn:incoming>
27 <bpmn:sequenceFlow id="SequenceFlow_01h9qmz" sourceRef="Call_BBToExecute" targetRef="Task_PostValidate" />
28 <bpmn:sequenceFlow id="Continue" name="Continue" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_PreValidate" />
29 <bpmn:serviceTask id="StatusPolicy" name="StatusPolicy" camunda:expression="${OrchestrationStatusValidator.validateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
30 <bpmn:incoming>SequenceFlow_0uzwjrq</bpmn:incoming>
31 <bpmn:outgoing>SequenceFlow_0je0y25</bpmn:outgoing>
33 <bpmn:exclusiveGateway id="CheckOrchestrationStatusValidationResults" name="Check OrchestrationStatus Validation Results" default="Continue">
34 <bpmn:incoming>SequenceFlow_0je0y25</bpmn:incoming>
35 <bpmn:outgoing>Continue</bpmn:outgoing>
36 <bpmn:outgoing>SequenceFlow_1j0vskt</bpmn:outgoing>
37 </bpmn:exclusiveGateway>
38 <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" />
39 <bpmn:subProcess id="SubProcess_0tv8zda" name="Error Handling " triggeredByEvent="true">
40 <bpmn:startEvent id="StartEvent_0tmcs9g">
41 <bpmn:outgoing>SequenceFlow_09synl9</bpmn:outgoing>
42 <bpmn:errorEventDefinition camunda:errorCodeVariable="WorkflowExceptionCode" camunda:errorMessageVariable="WorkflowExceptionMessage" />
44 <bpmn:sequenceFlow id="SequenceFlow_09synl9" sourceRef="StartEvent_0tmcs9g" targetRef="Task_QueryRainyDayTable" />
45 <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,true)}">
46 <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming>
47 <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing>
49 <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y">
50 <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming>
51 <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing>
52 <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing>
53 </bpmn:exclusiveGateway>
54 <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer">
55 <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming>
56 <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing>
57 <bpmn:timerEventDefinition>
58 <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration>
59 </bpmn:timerEventDefinition>
60 </bpmn:intermediateCatchEvent>
61 <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?">
62 <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming>
63 <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing>
64 <bpmn:outgoing>SequenceFlow_0541bid</bpmn:outgoing>
65 </bpmn:exclusiveGateway>
66 <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}">
67 <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming>
68 <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing>
70 <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" />
71 <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" />
72 <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt">
73 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression>
75 <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" />
76 <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" />
77 <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer">
78 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<execution.getVariable("maxRetries")}]]></bpmn:conditionExpression>
80 <bpmn:endEvent id="EndEvent_0mvmk3i">
81 <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming>
83 <bpmn:endEvent id="EndEvent_1sez2lh" name="end">
84 <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming>
85 <bpmn:terminateEventDefinition />
87 <bpmn:sequenceFlow id="SequenceFlow_0541bid" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_QuerySecondaryPolicy" />
88 <bpmn:sequenceFlow id="SequenceFlow_12ps9at" sourceRef="Task_QuerySecondaryPolicy" targetRef="EndEvent_0ex9298" />
89 <bpmn:endEvent id="EndEvent_0ex9298" name="end">
90 <bpmn:incoming>SequenceFlow_12ps9at</bpmn:incoming>
92 <bpmn:serviceTask id="Task_QuerySecondaryPolicy" name="Query Secondary Policy" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution,false)}">
93 <bpmn:incoming>SequenceFlow_0541bid</bpmn:incoming>
94 <bpmn:outgoing>SequenceFlow_12ps9at</bpmn:outgoing>
97 <bpmn:sequenceFlow id="SequenceFlow_16lmcxp" sourceRef="Task_setHandlingCodeSuccess" targetRef="End_ExecuteBuildingBlock" />
98 <bpmn:sequenceFlow id="SequenceFlow_1j0vskt" name="Silent Success" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_setHandlingCodeSuccess">
99 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("orchestrationStatusValidationResult").name() == "SILENT_SUCCESS"}]]></bpmn:conditionExpression>
101 <bpmn:serviceTask id="Task_setHandlingCodeSuccess" name="Set Handling Code To Success" camunda:expression="${ExecuteBuildingBlockRainyDay.setHandlingStatusSuccess(execution)}">
102 <bpmn:incoming>SequenceFlow_1j0vskt</bpmn:incoming>
103 <bpmn:incoming>SequenceFlow_12a4hhf</bpmn:incoming>
104 <bpmn:outgoing>SequenceFlow_16lmcxp</bpmn:outgoing>
106 <bpmn:sequenceFlow id="SequenceFlow_19wuics" sourceRef="Task_PreValidate" targetRef="Call_BBToExecute" />
107 <bpmn:sequenceFlow id="SequenceFlow_12a4hhf" sourceRef="Task_PostValidate" targetRef="Task_setHandlingCodeSuccess" />
108 <bpmn:serviceTask id="Task_PreValidate" name="PreValidate" camunda:expression="${BuildingBlockValidatorRunner.preValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
109 <bpmn:incoming>Continue</bpmn:incoming>
110 <bpmn:outgoing>SequenceFlow_19wuics</bpmn:outgoing>
112 <bpmn:serviceTask id="Task_PostValidate" name="PostValidate" camunda:expression="${BuildingBlockValidatorRunner.postValidate(execution.getVariable("flowToBeCalled"), InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}">
113 <bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming>
114 <bpmn:outgoing>SequenceFlow_12a4hhf</bpmn:outgoing>
117 <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" />
118 <bpmn:error id="Error_17zcdbk" name="Bpmn Error" />
119 <bpmn:error id="Error_123q3fr" name="Error_1h13m8l" />
120 <bpmn:error id="Error_1ivyybb" name="Error_1e4p3cf" />
121 <bpmn:error id="Error_1c60d7i" name="Error_0qrs661" />
122 <bpmn:error id="Error_1owi18u" name="Error_2eiqdl7" />
123 <bpmn:error id="Error_0snha16" />
124 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
125 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock">
126 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock">
127 <dc:Bounds x="111" y="162" width="36" height="36" />
129 <dc:Bounds x="119" y="198" width="22" height="12" />
132 <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute">
133 <dc:Bounds x="749" y="140" width="100" height="80" />
135 <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r">
136 <di:waypoint xsi:type="dc:Point" x="147" y="180" />
137 <di:waypoint xsi:type="dc:Point" x="184" y="180" />
139 <dc:Bounds x="120.5" y="165" width="90" height="0" />
142 <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq">
143 <di:waypoint xsi:type="dc:Point" x="284" y="180" />
144 <di:waypoint xsi:type="dc:Point" x="321" y="180" />
146 <dc:Bounds x="257.5" y="165" width="90" height="0" />
149 <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup">
150 <dc:Bounds x="184" y="140" width="100" height="80" />
152 <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock">
153 <dc:Bounds x="1221" y="162" width="36" height="36" />
155 <dc:Bounds x="1230" y="202" width="18" height="12" />
158 <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz">
159 <di:waypoint xsi:type="dc:Point" x="849" y="180" />
160 <di:waypoint xsi:type="dc:Point" x="906" y="180" />
162 <dc:Bounds x="832.5" y="159" width="90" height="12" />
165 <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true">
166 <dc:Bounds x="721" y="385" width="50" height="50" />
168 <dc:Bounds x="716" y="360" width="63" height="13" />
171 <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer">
172 <dc:Bounds x="965" y="392" width="36" height="36" />
174 <dc:Bounds x="956" y="367" width="55" height="13" />
177 <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true">
178 <dc:Bounds x="568" y="385" width="50" height="50" />
180 <dc:Bounds x="558" y="347" width="70" height="25" />
183 <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0">
184 <di:waypoint xsi:type="dc:Point" x="771" y="410" />
185 <di:waypoint xsi:type="dc:Point" x="836" y="410" />
187 <dc:Bounds x="788" y="385" width="18" height="13" />
190 <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva">
191 <di:waypoint xsi:type="dc:Point" x="618" y="410" />
192 <di:waypoint xsi:type="dc:Point" x="721" y="410" />
194 <dc:Bounds x="656" y="418" width="27" height="13" />
197 <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y">
198 <di:waypoint xsi:type="dc:Point" x="593" y="435" />
199 <di:waypoint xsi:type="dc:Point" x="593" y="491" />
201 <dc:Bounds x="600" y="456" width="85" height="13" />
204 <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable">
205 <dc:Bounds x="425" y="370" width="100" height="80" />
207 <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft">
208 <di:waypoint xsi:type="dc:Point" x="936" y="410" />
209 <di:waypoint xsi:type="dc:Point" x="965" y="410" />
211 <dc:Bounds x="906" y="389" width="90" height="12" />
214 <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc">
215 <di:waypoint xsi:type="dc:Point" x="1001" y="410" />
216 <di:waypoint xsi:type="dc:Point" x="1039" y="410" />
218 <dc:Bounds x="975" y="389" width="90" height="12" />
221 <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer">
222 <dc:Bounds x="836" y="370" width="100" height="80" />
224 <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue">
225 <di:waypoint xsi:type="dc:Point" x="508" y="180" />
226 <di:waypoint xsi:type="dc:Point" x="582" y="180" />
228 <dc:Bounds x="524.6653543307086" y="159" width="43" height="12" />
231 <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy">
232 <dc:Bounds x="321" y="140" width="100" height="80" />
234 <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true">
235 <dc:Bounds x="458" y="155" width="50" height="50" />
237 <dc:Bounds x="442" y="209" width="87" height="48" />
240 <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25">
241 <di:waypoint xsi:type="dc:Point" x="421" y="180" />
242 <di:waypoint xsi:type="dc:Point" x="458" y="180" />
244 <dc:Bounds x="394.5" y="159" width="90" height="12" />
247 <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c">
248 <di:waypoint xsi:type="dc:Point" x="525" y="410" />
249 <di:waypoint xsi:type="dc:Point" x="568" y="410" />
251 <dc:Bounds x="502" y="389" width="90" height="13" />
254 <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true">
255 <dc:Bounds x="320" y="294" width="802" height="290" />
257 <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g">
258 <dc:Bounds x="340" y="392" width="36" height="36" />
260 <dc:Bounds x="223" y="428" width="90" height="12" />
263 <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9">
264 <di:waypoint xsi:type="dc:Point" x="376" y="410" />
265 <di:waypoint xsi:type="dc:Point" x="425" y="410" />
267 <dc:Bounds x="356" y="389" width="90" height="12" />
270 <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i">
271 <dc:Bounds x="575" y="491" width="36" height="36" />
273 <dc:Bounds x="548" y="531" width="90" height="12" />
276 <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh">
277 <dc:Bounds x="1039" y="392" width="36" height="36" />
279 <dc:Bounds x="1049" y="432" width="19" height="13" />
282 <bpmndi:BPMNEdge id="SequenceFlow_16lmcxp_di" bpmnElement="SequenceFlow_16lmcxp">
283 <di:waypoint xsi:type="dc:Point" x="1163" y="180" />
284 <di:waypoint xsi:type="dc:Point" x="1221" y="180" />
286 <dc:Bounds x="1147" y="159" width="90" height="12" />
289 <bpmndi:BPMNEdge id="SequenceFlow_1j0vskt_di" bpmnElement="SequenceFlow_1j0vskt">
290 <di:waypoint xsi:type="dc:Point" x="483" y="155" />
291 <di:waypoint xsi:type="dc:Point" x="483" y="84" />
292 <di:waypoint xsi:type="dc:Point" x="1113" y="84" />
293 <di:waypoint xsi:type="dc:Point" x="1113" y="140" />
295 <dc:Bounds x="764.2235294117647" y="63" width="72" height="12" />
298 <bpmndi:BPMNShape id="ServiceTask_0z9izx5_di" bpmnElement="Task_setHandlingCodeSuccess">
299 <dc:Bounds x="1063" y="140" width="100" height="80" />
301 <bpmndi:BPMNEdge id="SequenceFlow_19wuics_di" bpmnElement="SequenceFlow_19wuics">
302 <di:waypoint xsi:type="dc:Point" x="682" y="180" />
303 <di:waypoint xsi:type="dc:Point" x="749" y="180" />
305 <dc:Bounds x="670.5" y="159" width="90" height="12" />
308 <bpmndi:BPMNEdge id="SequenceFlow_12a4hhf_di" bpmnElement="SequenceFlow_12a4hhf">
309 <di:waypoint xsi:type="dc:Point" x="1006" y="180" />
310 <di:waypoint xsi:type="dc:Point" x="1063" y="180" />
312 <dc:Bounds x="989.5" y="159" width="90" height="12" />
315 <bpmndi:BPMNShape id="ServiceTask_1pf5f6w_di" bpmnElement="Task_PreValidate">
316 <dc:Bounds x="582" y="140" width="100" height="80" />
318 <bpmndi:BPMNShape id="ServiceTask_02w4792_di" bpmnElement="Task_PostValidate">
319 <dc:Bounds x="906" y="140" width="100" height="80" />
321 <bpmndi:BPMNEdge id="SequenceFlow_0541bid_di" bpmnElement="SequenceFlow_0541bid">
322 <di:waypoint xsi:type="dc:Point" x="746" y="435" />
323 <di:waypoint xsi:type="dc:Point" x="746" y="459" />
325 <dc:Bounds x="757" y="436" width="13" height="13" />
328 <bpmndi:BPMNEdge id="SequenceFlow_12ps9at_di" bpmnElement="SequenceFlow_12ps9at">
329 <di:waypoint xsi:type="dc:Point" x="796" y="499" />
330 <di:waypoint xsi:type="dc:Point" x="868" y="499" />
332 <dc:Bounds x="787" y="478" width="90" height="12" />
335 <bpmndi:BPMNShape id="EndEvent_05vw85n_di" bpmnElement="EndEvent_0ex9298">
336 <dc:Bounds x="868" y="481" width="36" height="36" />
338 <dc:Bounds x="877" y="521" width="19" height="13" />
341 <bpmndi:BPMNShape id="ServiceTask_11f2c91_di" bpmnElement="Task_QuerySecondaryPolicy">
342 <dc:Bounds x="696" y="459" width="100" height="80" />
345 </bpmndi:BPMNDiagram>