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>Continue</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_setHandlingCodeSuccess" />
26 <bpmn:sequenceFlow id="Continue" name="Continue" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Call_BBToExecute" />
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)}">
44 <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming>
45 <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing>
47 <bpmn:endEvent id="ErrorEnd2">
48 <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming>
50 <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y">
51 <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming>
52 <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing>
53 <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing>
54 </bpmn:exclusiveGateway>
55 <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer">
56 <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming>
57 <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing>
58 <bpmn:timerEventDefinition>
59 <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration>
60 </bpmn:timerEventDefinition>
61 </bpmn:intermediateCatchEvent>
62 <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?">
63 <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming>
64 <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing>
65 <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing>
66 </bpmn:exclusiveGateway>
67 <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}">
68 <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming>
69 <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing>
71 <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" />
72 <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" />
73 <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" />
74 <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt">
75 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression>
77 <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" />
78 <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" />
79 <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer">
80 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression>
82 <bpmn:endEvent id="EndEvent_0mvmk3i">
83 <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming>
85 <bpmn:endEvent id="EndEvent_1sez2lh" name="end">
86 <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming>
87 <bpmn:terminateEventDefinition />
90 <bpmn:sequenceFlow id="SequenceFlow_16lmcxp" sourceRef="Task_setHandlingCodeSuccess" targetRef="End_ExecuteBuildingBlock" />
91 <bpmn:sequenceFlow id="SequenceFlow_1j0vskt" name="Silent Success" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Task_setHandlingCodeSuccess">
92 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("orchestrationStatusValidationResult").name() == "SILENT_SUCCESS"}]]></bpmn:conditionExpression>
94 <bpmn:serviceTask id="Task_setHandlingCodeSuccess" name="Set Handling Code To Success" camunda:expression="${ExecuteBuildingBlockRainyDay.setHandlingStatusSuccess(execution)}">
95 <bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming>
96 <bpmn:incoming>SequenceFlow_1j0vskt</bpmn:incoming>
97 <bpmn:outgoing>SequenceFlow_16lmcxp</bpmn:outgoing>
100 <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" />
101 <bpmn:error id="Error_17zcdbk" name="Bpmn Error" />
102 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
103 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock">
104 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock">
105 <dc:Bounds x="42" y="162" width="36" height="36" />
107 <dc:Bounds x="49" y="198" width="23" height="12" />
110 <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute">
111 <dc:Bounds x="589" y="140" width="100" height="80" />
113 <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r">
114 <di:waypoint xsi:type="dc:Point" x="78" y="180" />
115 <di:waypoint xsi:type="dc:Point" x="141" y="180" />
117 <dc:Bounds x="65" y="165" width="90" height="0" />
120 <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq">
121 <di:waypoint xsi:type="dc:Point" x="241" y="180" />
122 <di:waypoint xsi:type="dc:Point" x="307" y="180" />
124 <dc:Bounds x="229" y="165" width="90" height="0" />
127 <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup">
128 <dc:Bounds x="141" y="140" width="100" height="80" />
130 <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock">
131 <dc:Bounds x="871" y="162" width="36" height="36" />
133 <dc:Bounds x="880" y="202" width="18" height="12" />
136 <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz">
137 <di:waypoint xsi:type="dc:Point" x="689" y="180" />
138 <di:waypoint xsi:type="dc:Point" x="731" y="180" />
140 <dc:Bounds x="665" y="159" width="90" height="12" />
143 <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true">
144 <dc:Bounds x="435" y="467" width="50" height="50" />
146 <dc:Bounds x="430" y="442" width="62" height="12" />
149 <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer">
150 <dc:Bounds x="668" y="474" width="36" height="36" />
152 <dc:Bounds x="658" y="449" width="56" height="12" />
155 <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true">
156 <dc:Bounds x="324" y="467" width="50" height="50" />
158 <dc:Bounds x="315" y="429" width="68" height="24" />
161 <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0">
162 <di:waypoint xsi:type="dc:Point" x="485" y="492" />
163 <di:waypoint xsi:type="dc:Point" x="539" y="492" />
165 <dc:Bounds x="496.68461538461537" y="467" width="19" height="12" />
168 <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva">
169 <di:waypoint xsi:type="dc:Point" x="374" y="492" />
170 <di:waypoint xsi:type="dc:Point" x="435" y="492" />
172 <dc:Bounds x="390.60897435897436" y="500" width="27" height="12" />
175 <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y">
176 <di:waypoint xsi:type="dc:Point" x="349" y="517" />
177 <di:waypoint xsi:type="dc:Point" x="349" y="573" />
179 <dc:Bounds x="355" y="538" width="85" height="12" />
182 <bpmndi:BPMNShape id="EndEvent_0svi3iy_di" bpmnElement="ErrorEnd2">
183 <dc:Bounds x="442" y="573" width="36" height="36" />
185 <dc:Bounds x="452" y="613" width="18" height="12" />
188 <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable">
189 <dc:Bounds x="181" y="452" width="100" height="80" />
191 <bpmndi:BPMNEdge id="SequenceFlow_1db2c7t_di" bpmnElement="SequenceFlow_1db2c7t">
192 <di:waypoint xsi:type="dc:Point" x="460" y="517" />
193 <di:waypoint xsi:type="dc:Point" x="460" y="573" />
195 <dc:Bounds x="469" y="518.5833333333333" width="12" height="12" />
198 <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft">
199 <di:waypoint xsi:type="dc:Point" x="639" y="492" />
200 <di:waypoint xsi:type="dc:Point" x="668" y="492" />
202 <dc:Bounds x="608.5" y="471" width="90" height="12" />
205 <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc">
206 <di:waypoint xsi:type="dc:Point" x="704" y="492" />
207 <di:waypoint xsi:type="dc:Point" x="753" y="492" />
209 <dc:Bounds x="683.5" y="471" width="90" height="12" />
212 <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer">
213 <dc:Bounds x="539" y="452" width="100" height="80" />
215 <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue">
216 <di:waypoint xsi:type="dc:Point" x="508" y="180" />
217 <di:waypoint xsi:type="dc:Point" x="589" y="180" />
219 <dc:Bounds x="528" y="159" width="43" height="12" />
222 <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy">
223 <dc:Bounds x="307" y="140" width="100" height="80" />
225 <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true">
226 <dc:Bounds x="458" y="155" width="50" height="50" />
228 <dc:Bounds x="442" y="209" width="87" height="48" />
231 <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25">
232 <di:waypoint xsi:type="dc:Point" x="407" y="180" />
233 <di:waypoint xsi:type="dc:Point" x="458" y="180" />
235 <dc:Bounds x="388" y="159" width="90" height="12" />
238 <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c">
239 <di:waypoint xsi:type="dc:Point" x="281" y="492" />
240 <di:waypoint xsi:type="dc:Point" x="324" y="492" />
242 <dc:Bounds x="257.5" y="470.5" width="90" height="13" />
245 <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true">
246 <dc:Bounds x="76" y="376" width="733" height="253" />
248 <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g">
249 <dc:Bounds x="96" y="474" width="36" height="36" />
251 <dc:Bounds x="24" y="510" width="0" height="12" />
254 <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9">
255 <di:waypoint xsi:type="dc:Point" x="132" y="492" />
256 <di:waypoint xsi:type="dc:Point" x="181" y="492" />
258 <dc:Bounds x="156.5" y="471" width="0" height="12" />
261 <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i">
262 <dc:Bounds x="331" y="573" width="36" height="36" />
264 <dc:Bounds x="349" y="613" width="0" height="12" />
267 <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh">
268 <dc:Bounds x="753" y="474" width="36" height="36" />
270 <dc:Bounds x="763" y="514" width="18" height="12" />
273 <bpmndi:BPMNEdge id="SequenceFlow_16lmcxp_di" bpmnElement="SequenceFlow_16lmcxp">
274 <di:waypoint xsi:type="dc:Point" x="831" y="180" />
275 <di:waypoint xsi:type="dc:Point" x="871" y="180" />
277 <dc:Bounds x="851" y="159" width="0" height="12" />
280 <bpmndi:BPMNEdge id="SequenceFlow_1j0vskt_di" bpmnElement="SequenceFlow_1j0vskt">
281 <di:waypoint xsi:type="dc:Point" x="483" y="155" />
282 <di:waypoint xsi:type="dc:Point" x="483" y="84" />
283 <di:waypoint xsi:type="dc:Point" x="781" y="84" />
284 <di:waypoint xsi:type="dc:Point" x="781" y="140" />
286 <dc:Bounds x="597" y="63" width="72" height="12" />
289 <bpmndi:BPMNShape id="ServiceTask_0z9izx5_di" bpmnElement="Task_setHandlingCodeSuccess">
290 <dc:Bounds x="731" y="140" width="100" height="80" />
293 </bpmndi:BPMNDiagram>