1 <?xml version="1.0" encoding="UTF-8"?>
2 <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_wAtdAGrUEeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
3 <bpmn2:process id="GenericDeleteService" name="GenericDeleteService" isExecutable="true">
4 <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
5 <bpmn2:scriptTask id="processError" name="Process Error" scriptFormat="groovy">
6 <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
7 <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
8 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
10 ExceptionUtil ex = new ExceptionUtil()
11 ex.processSubflowsBPMNException(execution)
14 <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="processError" targetRef="EndEvent_3"/>
15 <bpmn2:startEvent id="StartEvent_2">
16 <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
17 <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
19 <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="StartEvent_2" targetRef="processError"/>
20 <bpmn2:endEvent id="EndEvent_3">
21 <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
22 <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_25"/>
25 <bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
26 <bpmn2:endEvent id="EndEvent_2">
27 <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
29 <bpmn2:scriptTask id="processJavaError" name="Process Error">
30 <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
31 <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
32 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
34 ExceptionUtil ex = new ExceptionUtil()
35 ex.processSubflowsJavaException(execution)
38 <bpmn2:startEvent id="StartEvent_3">
39 <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
40 <bpmn2:errorEventDefinition id="ErrorEventDefinition_2"/>
42 <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="StartEvent_3" targetRef="processJavaError"/>
43 <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="processJavaError" targetRef="EndEvent_2"/>
45 <bpmn2:startEvent id="StartEvent_1">
46 <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
48 <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="initialization"/>
49 <bpmn2:scriptTask id="initialization" name="Initialization" scriptFormat="groovy">
50 <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
51 <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
52 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
53 GenericDeleteService deleteService = new GenericDeleteService()
54 deleteService.preProcessRequest(execution)
57 <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="initialization" targetRef="resourceVersionCheck"/>
58 <bpmn2:exclusiveGateway id="resourceVersionCheck" name="Resource Version Provided?" default="yes">
59 <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
60 <bpmn2:outgoing>no</bpmn2:outgoing>
61 <bpmn2:outgoing>yes</bpmn2:outgoing>
62 </bpmn2:exclusiveGateway>
63 <bpmn2:sequenceFlow id="no" name="No" sourceRef="resourceVersionCheck" targetRef="queryForResourceVersion">
64 <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_resourceVersionProvidedFlag" ) == false}]]></bpmn2:conditionExpression>
66 <bpmn2:sequenceFlow id="yes" name="Yes" sourceRef="resourceVersionCheck" targetRef="ExclusiveGateway_2"/>
67 <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
68 <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
69 <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
70 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
71 GenericDeleteService deleteService = new GenericDeleteService()
72 deleteService.setSuccessIndicator(execution, true)
74 execution.setVariable("WorkflowResponse", " ") //for junits
77 <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
78 <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
79 <bpmn2:incoming>yes</bpmn2:incoming>
80 <bpmn2:incoming>siExistYes</bpmn2:incoming>
81 <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
82 </bpmn2:exclusiveGateway>
83 <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ExclusiveGateway_2" targetRef="deleteServiceInstance"/>
84 <bpmn2:endEvent id="EndEvent_1">
85 <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
86 <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_24"/>
88 <bpmn2:scriptTask id="deleteServiceInstance" name="DELETE
Service Instance" scriptFormat="groovy">
89 <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
90 <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
91 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
92 GenericDeleteService deleteService = new GenericDeleteService()
93 deleteService.deleteServiceObject(execution)]]></bpmn2:script>
95 <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="deleteServiceInstance" targetRef="toggleSuccess"/>
96 <bpmn2:scriptTask id="queryForResourceVersion" name="Query SI Resource Version" scriptFormat="groovy">
97 <bpmn2:incoming>no</bpmn2:incoming>
98 <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
99 <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
100 GenericDeleteService deleteService = new GenericDeleteService()
101 deleteService.getServiceResourceVersion(execution)]]></bpmn2:script>
103 <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="queryForResourceVersion" targetRef="siExistCheck"/>
104 <bpmn2:exclusiveGateway id="siExistCheck" name="Service Exist?">
105 <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
106 <bpmn2:outgoing>siExistYes</bpmn2:outgoing>
107 <bpmn2:outgoing>siExistNo</bpmn2:outgoing>
108 </bpmn2:exclusiveGateway>
109 <bpmn2:sequenceFlow id="siExistYes" name="Yes" sourceRef="siExistCheck" targetRef="ExclusiveGateway_2">
110 <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENDS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
111 </bpmn2:sequenceFlow>
112 <bpmn2:sequenceFlow id="siExistNo" name="No" sourceRef="siExistCheck" targetRef="EndEvent_4"/>
113 <bpmn2:endEvent id="EndEvent_4">
114 <bpmn2:incoming>siExistNo</bpmn2:incoming>
115 <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_38"/>
118 <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
119 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
120 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericDeleteService">
121 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_63" bpmnElement="StartEvent_1">
122 <dc:Bounds height="36.0" width="36.0" x="84.0" y="221.0"/>
124 <dc:Bounds height="0.0" width="0.0" x="102.0" y="262.0"/>
127 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_267" bpmnElement="initialization">
128 <dc:Bounds height="80.0" width="100.0" x="216.0" y="199.0"/>
130 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="resourceVersionCheck" isMarkerVisible="true">
131 <dc:Bounds height="50.0" width="50.0" x="365.0" y="213.0"/>
133 <dc:Bounds height="22.0" width="169.0" x="401.0" y="243.0"/>
136 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_268" bpmnElement="queryForResourceVersion">
137 <dc:Bounds height="80.0" width="100.0" x="457.0" y="100.0"/>
139 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
140 <dc:Bounds height="50.0" width="50.0" x="600.0" y="213.0"/>
142 <dc:Bounds height="0.0" width="0.0" x="625.0" y="268.0"/>
145 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="deleteServiceInstance">
146 <dc:Bounds height="80.0" width="100.0" x="684.0" y="199.0"/>
148 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_213" bpmnElement="EndEvent_1">
149 <dc:Bounds height="36.0" width="36.0" x="1006.0" y="221.0"/>
151 <dc:Bounds height="0.0" width="0.0" x="1024.0" y="262.0"/>
154 <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
155 <dc:Bounds height="169.0" width="321.0" x="155.0" y="384.0"/>
157 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_267">
158 <di:waypoint xsi:type="dc:Point" x="120.0" y="239.0"/>
159 <di:waypoint xsi:type="dc:Point" x="216.0" y="239.0"/>
161 <dc:Bounds height="6.0" width="6.0" x="147.0" y="239.0"/>
164 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_267" targetElement="_BPMNShape_ExclusiveGateway_224">
165 <di:waypoint xsi:type="dc:Point" x="316.0" y="239.0"/>
166 <di:waypoint xsi:type="dc:Point" x="365.0" y="238.0"/>
168 <dc:Bounds height="6.0" width="6.0" x="217.0" y="238.0"/>
171 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="no" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ScriptTask_268">
172 <di:waypoint xsi:type="dc:Point" x="390.0" y="213.0"/>
173 <di:waypoint xsi:type="dc:Point" x="390.0" y="140.0"/>
174 <di:waypoint xsi:type="dc:Point" x="457.0" y="140.0"/>
176 <dc:Bounds height="22.0" width="22.0" x="392.0" y="179.0"/>
179 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_268" targetElement="_BPMNShape_ExclusiveGateway_241">
180 <di:waypoint xsi:type="dc:Point" x="557.0" y="140.0"/>
181 <di:waypoint xsi:type="dc:Point" x="600.0" y="139.0"/>
183 <dc:Bounds height="6.0" width="6.0" x="492.0" y="140.0"/>
186 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_269">
187 <di:waypoint xsi:type="dc:Point" x="650.0" y="238.0"/>
188 <di:waypoint xsi:type="dc:Point" x="684.0" y="239.0"/>
190 <dc:Bounds height="6.0" width="6.0" x="556.0" y="239.0"/>
193 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_ScriptTask_272">
194 <di:waypoint xsi:type="dc:Point" x="784.0" y="239.0"/>
195 <di:waypoint xsi:type="dc:Point" x="826.0" y="239.0"/>
197 <dc:Bounds height="6.0" width="6.0" x="778.0" y="239.0"/>
200 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="yes" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="_BPMNShape_ExclusiveGateway_225">
201 <di:waypoint xsi:type="dc:Point" x="390.0" y="263.0"/>
202 <di:waypoint xsi:type="dc:Point" x="390.0" y="310.0"/>
203 <di:waypoint xsi:type="dc:Point" x="517.0" y="310.0"/>
204 <di:waypoint xsi:type="dc:Point" x="625.0" y="310.0"/>
205 <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>
207 <dc:Bounds height="22.0" width="29.0" x="389.0" y="278.0"/>
210 <bpmndi:BPMNShape id="_BPMNShape_SubProcess_23" bpmnElement="javaExceptionSubProcess" isExpanded="true">
211 <dc:Bounds height="157.0" width="306.0" x="163.0" y="576.0"/>
213 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_65" bpmnElement="StartEvent_2">
214 <dc:Bounds height="36.0" width="36.0" x="180.0" y="451.0"/>
216 <dc:Bounds height="0.0" width="0.0" x="198.0" y="492.0"/>
219 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_66" bpmnElement="StartEvent_3">
220 <dc:Bounds height="36.0" width="36.0" x="192.0" y="637.0"/>
222 <dc:Bounds height="0.0" width="0.0" x="210.0" y="678.0"/>
225 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_216" bpmnElement="EndEvent_2">
226 <dc:Bounds height="36.0" width="36.0" x="408.0" y="637.0"/>
228 <dc:Bounds height="0.0" width="0.0" x="426.0" y="678.0"/>
231 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_217" bpmnElement="EndEvent_3">
232 <dc:Bounds height="36.0" width="36.0" x="420.0" y="451.0"/>
234 <dc:Bounds height="0.0" width="0.0" x="438.0" y="492.0"/>
237 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="processError">
238 <dc:Bounds height="80.0" width="100.0" x="266.0" y="429.0"/>
240 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_271" bpmnElement="processJavaError">
241 <dc:Bounds height="80.0" width="100.0" x="267.0" y="615.0"/>
243 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_StartEvent_65" targetElement="_BPMNShape_ScriptTask_270">
244 <di:waypoint xsi:type="dc:Point" x="216.0" y="469.0"/>
245 <di:waypoint xsi:type="dc:Point" x="266.0" y="469.0"/>
247 <dc:Bounds height="6.0" width="6.0" x="232.0" y="469.0"/>
250 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_217">
251 <di:waypoint xsi:type="dc:Point" x="366.0" y="469.0"/>
252 <di:waypoint xsi:type="dc:Point" x="420.0" y="469.0"/>
254 <dc:Bounds height="6.0" width="6.0" x="384.0" y="469.0"/>
257 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_66" targetElement="_BPMNShape_ScriptTask_271">
258 <di:waypoint xsi:type="dc:Point" x="228.0" y="655.0"/>
259 <di:waypoint xsi:type="dc:Point" x="267.0" y="655.0"/>
261 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_271" targetElement="_BPMNShape_EndEvent_216">
262 <di:waypoint xsi:type="dc:Point" x="367.0" y="655.0"/>
263 <di:waypoint xsi:type="dc:Point" x="408.0" y="655.0"/>
265 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_272" bpmnElement="toggleSuccess">
266 <dc:Bounds height="80.0" width="100.0" x="826.0" y="199.0"/>
268 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_272" targetElement="_BPMNShape_EndEvent_213">
269 <di:waypoint xsi:type="dc:Point" x="926.0" y="239.0"/>
270 <di:waypoint xsi:type="dc:Point" x="1006.0" y="239.0"/>
272 <dc:Bounds height="6.0" width="6.0" x="828.0" y="239.0"/>
275 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_241" bpmnElement="siExistCheck" isMarkerVisible="true">
276 <dc:Bounds height="50.0" width="50.0" x="600.0" y="114.0"/>
278 <dc:Bounds height="22.0" width="59.0" x="596.0" y="94.0"/>
281 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="siExistYes" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_ExclusiveGateway_225">
282 <di:waypoint xsi:type="dc:Point" x="625.0" y="164.0"/>
283 <di:waypoint xsi:type="dc:Point" x="625.0" y="213.0"/>
285 <dc:Bounds height="22.0" width="29.0" x="624.0" y="168.0"/>
288 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="siExistNo" sourceElement="_BPMNShape_ExclusiveGateway_241" targetElement="_BPMNShape_EndEvent_241">
289 <di:waypoint xsi:type="dc:Point" x="650.0" y="139.0"/>
290 <di:waypoint xsi:type="dc:Point" x="733.0" y="140.0"/>
292 <dc:Bounds height="22.0" width="22.0" x="664.0" y="140.0"/>
295 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_241" bpmnElement="EndEvent_4">
296 <dc:Bounds height="36.0" width="36.0" x="733.0" y="122.0"/>
298 <dc:Bounds height="0.0" width="0.0" x="751.0" y="163.0"/>
302 </bpmndi:BPMNDiagram>