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" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
3 <bpmn2:process id="DoDeleteVnf" name="DoDeleteVnf" isExecutable="true">
4 <bpmn2:startEvent id="StartEvent_1">
5 <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
7 <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
8 <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
9 <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
10 <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
11 <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
12 DoDeleteVnf deleteVnf = new DoDeleteVnf()
13 deleteVnf.preProcessRequest(execution)]]></bpmn2:script>
15 <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="callGetVnf" />
16 <bpmn2:callActivity id="callGetVnf" name="Get Generic Vnf" calledElement="GenericGetVnf">
17 <bpmn2:extensionElements>
18 <camunda:out source="GENGV_vnf" target="DoDVNF_genericVnf" />
19 <camunda:out source="WorkflowException" target="WorkflowException" />
20 <camunda:out source="GENGV_SuccessIndicator" target="GENGV_SuccessIndicator" />
21 <camunda:out source="GENGV_FoundIndicator" target="GENGV_FoundIndicator" />
22 <camunda:in source="DoDVNF_type" target="GENGV_type" />
23 <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
24 <camunda:in source="DoDVNF_vnfId" target="GENGV_vnfId" />
25 </bpmn2:extensionElements>
26 <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
27 <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
29 <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="callGetVnf" targetRef="vnfFoundCheck" />
30 <bpmn2:exclusiveGateway id="vnfFoundCheck" name="Vnf Found?" default="notFound">
31 <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
32 <bpmn2:outgoing>vnfFound</bpmn2:outgoing>
33 <bpmn2:outgoing>notFound</bpmn2:outgoing>
34 </bpmn2:exclusiveGateway>
35 <bpmn2:sequenceFlow id="vnfFound" name="Yes" sourceRef="vnfFoundCheck" targetRef="processResponse">
36 <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_FoundIndicator") == true && execution.getVariable("GENGV_SuccessIndicator") == true}]]></bpmn2:conditionExpression>
38 <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="vnfFoundCheck" targetRef="IntermediateThrowEvent_1" />
39 <bpmn2:scriptTask id="processResponse" name="Process Response" scriptFormat="groovy">
40 <bpmn2:incoming>vnfFound</bpmn2:incoming>
41 <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
42 <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
43 DoDeleteVnf deleteVnf = new DoDeleteVnf()
44 deleteVnf.processGetVnfResponse(execution)]]></bpmn2:script>
46 <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="processResponse" targetRef="vnfInUseCheck" />
47 <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="Skip Delete">
48 <bpmn2:incoming>notFound</bpmn2:incoming>
49 <bpmn2:linkEventDefinition id="LinkEventDefinition_1" name="Skip Delete" />
50 </bpmn2:intermediateThrowEvent>
51 <bpmn2:exclusiveGateway id="vnfInUseCheck" name="Vnf In Use?" default="notInUse">
52 <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
53 <bpmn2:outgoing>inUse</bpmn2:outgoing>
54 <bpmn2:outgoing>notInUse</bpmn2:outgoing>
55 </bpmn2:exclusiveGateway>
56 <bpmn2:sequenceFlow id="inUse" name="Yes" sourceRef="vnfInUseCheck" targetRef="createWorkflowExceptionInUse">
57 <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DoDVNF_vnfInUse") == true}]]></bpmn2:conditionExpression>
59 <bpmn2:sequenceFlow id="notInUse" name="No" sourceRef="vnfInUseCheck" targetRef="deleteVnf" />
60 <bpmn2:scriptTask id="createWorkflowExceptionInUse" name="Create Workflow Exception" scriptFormat="groovy">
61 <bpmn2:incoming>inUse</bpmn2:incoming>
62 <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
63 <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
64 ExceptionUtil exceptionUtil = new ExceptionUtil()
65 exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Can't Delete Generic Vnf. Generic Vnf is still in use.")]]></bpmn2:script>
67 <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="createWorkflowExceptionInUse" targetRef="EndEvent_1" />
68 <bpmn2:endEvent id="EndEvent_1">
69 <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
70 <bpmn2:errorEventDefinition id="_ErrorEventDefinition_93" errorRef="Error_1" />
72 <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="deleteVnf" targetRef="ExclusiveGateway_2" />
73 <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
74 <bpmn2:endEvent id="EndEvent_4">
75 <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
77 <bpmn2:startEvent id="StartEvent_3">
78 <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
79 <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
81 <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
82 <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
83 <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
84 <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
85 <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
86 ExceptionUtil exceptionUtil = new ExceptionUtil()
87 exceptionUtil.processJavaException(execution)]]></bpmn2:script>
89 <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
91 <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
92 <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
93 <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
94 <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
95 </bpmn2:exclusiveGateway>
96 <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_2" />
97 <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" name="Skip Delete">
98 <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
99 <bpmn2:linkEventDefinition id="LinkEventDefinition_2" name="Skip Delete" />
100 </bpmn2:intermediateCatchEvent>
101 <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="IntermediateCatchEvent_1" targetRef="ExclusiveGateway_2" />
102 <bpmn2:endEvent id="EndEvent_2">
103 <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
104 <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
106 <bpmn2:scriptTask id="deleteVnf" name=" AAI Delete (generic vnf) " scriptFormat="groovy">
107 <bpmn2:incoming>notInUse</bpmn2:incoming>
108 <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
109 <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
110 DoDeleteVnf delete = new DoDeleteVnf()
111 delete.deleteVnf(execution)]]></bpmn2:script>
114 <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
115 <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
116 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
117 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVnf">
118 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
119 <dc:Bounds x="215" y="209" width="36" height="36" />
121 <dc:Bounds x="233" y="250" width="0" height="0" />
124 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
125 <dc:Bounds x="322" y="188" width="100" height="80" />
127 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
128 <di:waypoint xsi:type="dc:Point" x="251" y="227" />
129 <di:waypoint xsi:type="dc:Point" x="322" y="228" />
131 <dc:Bounds x="287" y="212.5" width="0" height="0" />
134 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_311">
135 <di:waypoint xsi:type="dc:Point" x="422" y="228" />
136 <di:waypoint xsi:type="dc:Point" x="504" y="228" />
138 <dc:Bounds x="463" y="213" width="0" height="0" />
141 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_314" bpmnElement="processResponse">
142 <dc:Bounds x="704" y="291" width="100" height="80" />
144 <bpmndi:BPMNShape id="_BPMNShape_CallActivity_63" bpmnElement="callGetVnf">
145 <dc:Bounds x="504" y="188" width="100" height="80" />
147 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_236" bpmnElement="vnfInUseCheck" isMarkerVisible="true">
148 <dc:Bounds x="840" y="305" width="50" height="50" />
150 <dc:Bounds x="890" y="335" width="73" height="22" />
153 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_314" targetElement="_BPMNShape_ExclusiveGateway_236">
154 <di:waypoint xsi:type="dc:Point" x="804" y="331" />
155 <di:waypoint xsi:type="dc:Point" x="840" y="330" />
157 <dc:Bounds x="799" y="325" width="6" height="6" />
160 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_CallActivity_63" targetElement="_BPMNShape_ExclusiveGateway_237">
161 <di:waypoint xsi:type="dc:Point" x="604" y="228" />
162 <di:waypoint xsi:type="dc:Point" x="634" y="227" />
164 <dc:Bounds x="630" y="227" width="6" height="6" />
167 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_315" bpmnElement="createWorkflowExceptionInUse">
168 <dc:Bounds x="912" y="196" width="100" height="80" />
170 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="inUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="_BPMNShape_ScriptTask_315">
171 <di:waypoint xsi:type="dc:Point" x="865" y="305" />
172 <di:waypoint xsi:type="dc:Point" x="865" y="236" />
173 <di:waypoint xsi:type="dc:Point" x="912" y="236" />
175 <dc:Bounds x="867" y="258" width="29" height="22" />
178 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="notInUse" sourceElement="_BPMNShape_ExclusiveGateway_236" targetElement="ScriptTask_1ps8v06_di">
179 <di:waypoint xsi:type="dc:Point" x="865" y="355" />
180 <di:waypoint xsi:type="dc:Point" x="865" y="424" />
181 <di:waypoint xsi:type="dc:Point" x="912" y="424" />
183 <dc:Bounds x="874" y="384" width="14" height="12" />
186 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_236" bpmnElement="EndEvent_1">
187 <dc:Bounds x="1100" y="218" width="36" height="36" />
189 <dc:Bounds x="1118" y="259" width="0" height="0" />
192 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_315" targetElement="_BPMNShape_EndEvent_236">
193 <di:waypoint xsi:type="dc:Point" x="1012" y="236" />
194 <di:waypoint xsi:type="dc:Point" x="1100" y="236" />
196 <dc:Bounds x="1062" y="236" width="6" height="6" />
199 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_237" bpmnElement="vnfFoundCheck" isMarkerVisible="true">
200 <dc:Bounds x="634" y="202" width="50" height="50" />
202 <dc:Bounds x="672" y="240" width="72" height="22" />
205 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="vnfFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_ScriptTask_314">
206 <di:waypoint xsi:type="dc:Point" x="659" y="252" />
207 <di:waypoint xsi:type="dc:Point" x="659" y="331" />
208 <di:waypoint xsi:type="dc:Point" x="704" y="331" />
210 <dc:Bounds x="659" y="288" width="29" height="22" />
213 <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_2" bpmnElement="IntermediateThrowEvent_1">
214 <dc:Bounds x="740" y="102" width="36" height="36" />
216 <dc:Bounds x="722" y="143" width="73" height="22" />
219 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_237" targetElement="_BPMNShape_IntermediateThrowEvent_2">
220 <di:waypoint xsi:type="dc:Point" x="659" y="202" />
221 <di:waypoint xsi:type="dc:Point" x="659" y="120" />
222 <di:waypoint xsi:type="dc:Point" x="740" y="120" />
224 <dc:Bounds x="662" y="144" width="22" height="22" />
227 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
228 <dc:Bounds x="1174" y="405" width="36" height="36" />
230 <dc:Bounds x="1192" y="446" width="0" height="0" />
233 <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_238" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
234 <dc:Bounds x="1062" y="398" width="50" height="50" />
236 <dc:Bounds x="1087" y="453" width="0" height="0" />
239 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="ScriptTask_1ps8v06_di" targetElement="_BPMNShape_ExclusiveGateway_238">
240 <di:waypoint xsi:type="dc:Point" x="1012" y="424" />
241 <di:waypoint xsi:type="dc:Point" x="1062" y="423" />
243 <dc:Bounds x="992" y="405.5" width="90" height="6" />
246 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_238">
247 <di:waypoint xsi:type="dc:Point" x="1111" y="422" />
248 <di:waypoint xsi:type="dc:Point" x="1174" y="423" />
250 <dc:Bounds x="1143" y="407.5" width="0" height="0" />
253 <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_2" bpmnElement="IntermediateCatchEvent_1">
254 <dc:Bounds x="1069" y="492" width="36" height="36" />
256 <dc:Bounds x="1051" y="533" width="73" height="22" />
259 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_IntermediateCatchEvent_2" targetElement="_BPMNShape_ExclusiveGateway_238">
260 <di:waypoint xsi:type="dc:Point" x="1087" y="492" />
261 <di:waypoint xsi:type="dc:Point" x="1087" y="448" />
263 <dc:Bounds x="1084" y="462" width="6" height="6" />
266 <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
267 <dc:Bounds x="379" y="614" width="312" height="157" />
269 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
270 <dc:Bounds x="408" y="675" width="36" height="36" />
272 <dc:Bounds x="426" y="716" width="0" height="0" />
275 <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
276 <dc:Bounds x="624" y="675" width="36" height="36" />
278 <dc:Bounds x="642" y="716" width="0" height="0" />
281 <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
282 <dc:Bounds x="486" y="653" width="100" height="80" />
284 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
285 <di:waypoint xsi:type="dc:Point" x="444" y="693" />
286 <di:waypoint xsi:type="dc:Point" x="486" y="693" />
288 <dc:Bounds x="465" y="693" width="0" height="0" />
291 <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
292 <di:waypoint xsi:type="dc:Point" x="586" y="693" />
293 <di:waypoint xsi:type="dc:Point" x="624" y="693" />
295 <dc:Bounds x="605" y="693" width="0" height="0" />
298 <bpmndi:BPMNShape id="ScriptTask_1ps8v06_di" bpmnElement="deleteVnf">
299 <dc:Bounds x="912" y="384" width="100" height="80" />
302 </bpmndi:BPMNDiagram>