Dynamic Cloud Owner Support
[so.git] / bpmn / so-bpmn-infrastructure-flows / src / main / resources / subprocess / DoUpdateVnfAndModules.bpmn
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.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
3   <bpmn2:process id="DoUpdateVnfAndModules" name="DoUpdateVnfAndModules" isExecutable="true">
4     <bpmn2:startEvent id="StartEvent_1">
5       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
6     </bpmn2:startEvent>
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_08nd69s</bpmn2:outgoing>
11       <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
12 DoUpdateVnfAndModules updateVnfAndModules = new DoUpdateVnfAndModules()
13 updateVnfAndModules.preProcessRequest(execution)]]></bpmn2:script>
14     </bpmn2:scriptTask>
15     <bpmn2:subProcess id="javaErrorHandlingSubProcess" name="Java Exception Handling Sub Process" triggeredByEvent="true">
16       <bpmn2:endEvent id="EndEvent_4">
17         <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
18       </bpmn2:endEvent>
19       <bpmn2:startEvent id="StartEvent_3">
20         <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
21         <bpmn2:errorEventDefinition id="_ErrorEventDefinition_95" errorRef="Error_2" />
22       </bpmn2:startEvent>
23       <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="StartEvent_3" targetRef="processJavaException" />
24       <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy">
25         <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
26         <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
27         <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
28 ExceptionUtil exceptionUtil = new ExceptionUtil()
29 exceptionUtil.processJavaException(execution)]]></bpmn2:script>
30       </bpmn2:scriptTask>
31       <bpmn2:sequenceFlow id="SequenceFlow_19" name="" sourceRef="processJavaException" targetRef="EndEvent_4" />
32     </bpmn2:subProcess>
33     <bpmn2:endEvent id="EndEvent_2">
34       <bpmn2:incoming>SequenceFlow_0of4kmm</bpmn2:incoming>
35       <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_36" />
36     </bpmn2:endEvent>
37     <bpmn2:exclusiveGateway id="ExclusiveGateway_1amun4k" name="Are there VF modules to update?" default="SequenceFlow_19c7hcw">
38       <bpmn2:incoming>SequenceFlow_0t4yszi</bpmn2:incoming>
39       <bpmn2:incoming>SequenceFlow_1f4mbkc</bpmn2:incoming>
40       <bpmn2:outgoing>SequenceFlow_1qrkdn3</bpmn2:outgoing>
41       <bpmn2:outgoing>SequenceFlow_19c7hcw</bpmn2:outgoing>
42     </bpmn2:exclusiveGateway>
43     <bpmn2:sequenceFlow id="SequenceFlow_08nd69s" sourceRef="intialization" targetRef="QueryVnf" />
44     <bpmn2:sequenceFlow id="SequenceFlow_1qrkdn3" name="yes" sourceRef="ExclusiveGateway_1amun4k" targetRef="PrepareModuleList">
45       <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("DUVAM_nextModule") < execution.getVariable("DUVAM_moduleCount")]]></bpmn2:conditionExpression>
46     </bpmn2:sequenceFlow>
47     <bpmn2:callActivity id="UpdateVFModule" name="Do Update VF Module" calledElement="DoUpdateVfModule">
48       <bpmn2:extensionElements>
49         <camunda:in source="msoRequestId" target="msoRequestId" />
50         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
51         <camunda:out source="WorkflowException" target="WorkflowException" />
52         <camunda:in source="isVidRequest" target="isVidRequest" />
53         <camunda:in source="vnfType" target="vnfType" />
54         <camunda:in source="vnfName" target="vnfName" />
55         <camunda:in source="vnfId" target="vnfId" />
56         <camunda:in source="DUVAM_vfModuleName" target="vfModuleName" />
57         <camunda:in source="DUVAM_vfModuleId" target="vfModuleId" />
58         <camunda:in source="DUVAM_volumeGroupId" target="volumeGroupId" />
59         <camunda:in source="DUVAM_volumeGroupName" target="volumeGroupName" />
60         <camunda:in source="DUVAM_isBaseVfModule" target="isBaseVfModule" />
61         <camunda:in source="asdcServiceModelVersion" target="asdcServiceModelVersion" />
62         <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
63         <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
64         <camunda:in source="vnfModelInfo" target="vnfModelInfo" />
65         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
66         <camunda:in source="cloudOwner" target="cloudOwner" />
67         <camunda:in source="lcpCloudRegionId" target="lcpCloudRegionId" />
68         <camunda:in source="tenantId" target="tenantId" />
69         <camunda:in source="sdncVersion" target="sdncVersion" />
70         <camunda:in source="DUVAM_vfModuleModelInfo" target="vfModuleModelInfo" />
71         <camunda:in source="usePreload" target="usePreload" />
72         <camunda:in source="vfModuleInputParams" target="vfModuleInputParams" />
73       </bpmn2:extensionElements>
74       <bpmn2:incoming>SequenceFlow_04o61yk</bpmn2:incoming>
75       <bpmn2:outgoing>SequenceFlow_1p4ycii</bpmn2:outgoing>
76     </bpmn2:callActivity>
77     <bpmn2:sequenceFlow id="SequenceFlow_1p4ycii" sourceRef="UpdateVFModule" targetRef="PostProcessUpdateVfModule" />
78     <bpmn2:sequenceFlow id="SequenceFlow_0t4yszi" sourceRef="PostProcessUpdateVfModule" targetRef="ExclusiveGateway_1amun4k" />
79     <bpmn2:scriptTask id="QueryVnf" name="Query VNF" scriptFormat="groovy">
80       <bpmn2:incoming>SequenceFlow_08nd69s</bpmn2:incoming>
81       <bpmn2:outgoing>SequenceFlow_1f4mbkc</bpmn2:outgoing>
82       <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
83 def duvam = new DoUpdateVnfAndModules()
84 duvam.queryAAIVfModule(execution)]]></bpmn2:script>
85     </bpmn2:scriptTask>
86     <bpmn2:scriptTask id="PrepareModuleList" name="Prepare Next Module To Update" scriptFormat="groovy">
87       <bpmn2:incoming>SequenceFlow_1qrkdn3</bpmn2:incoming>
88       <bpmn2:outgoing>SequenceFlow_04o61yk</bpmn2:outgoing>
89       <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
90 def duvam = new DoUpdateVnfAndModules()
91 duvam.prepareNextModuleToUpdate(execution)]]></bpmn2:script>
92     </bpmn2:scriptTask>
93     <bpmn2:scriptTask id="PostProcessUpdateVfModule" name="PostProcess Update VF Module" scriptFormat="groovy">
94       <bpmn2:incoming>SequenceFlow_1p4ycii</bpmn2:incoming>
95       <bpmn2:outgoing>SequenceFlow_0t4yszi</bpmn2:outgoing>
96       <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
97 int nextModule = execution.getVariable("DUVAM_nextModule")
98                         execution.setVariable("DUVAM_nextModule", nextModule + 1)]]></bpmn2:script>
99     </bpmn2:scriptTask>
100     <bpmn2:sequenceFlow id="SequenceFlow_04o61yk" sourceRef="PrepareModuleList" targetRef="UpdateVFModule" />
101     <bpmn2:sequenceFlow id="SequenceFlow_19c7hcw" name="no" sourceRef="ExclusiveGateway_1amun4k" targetRef="PreProcessUpdateAAIGenericVNF" />
102     <bpmn2:sequenceFlow id="SequenceFlow_0of4kmm" sourceRef="UpdateAAIGenericVNFTask" targetRef="EndEvent_2" />
103     <bpmn2:sequenceFlow id="SequenceFlow_1ltycz6" sourceRef="PreProcessUpdateAAIGenericVNF" targetRef="UpdateAAIGenericVNFTask" />
104     <bpmn2:callActivity id="UpdateAAIGenericVNFTask" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
105       <bpmn2:extensionElements>
106         <camunda:in source="DUVAM_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
107         <camunda:in source="mso-request-id" target="mso-request-id" />
108         <camunda:in source="mso-service-id" target="mso-service-id" />
109         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
110         <camunda:out source="WorkflowException" target="WorkflowException" />
111       </bpmn2:extensionElements>
112       <bpmn2:incoming>SequenceFlow_1ltycz6</bpmn2:incoming>
113       <bpmn2:outgoing>SequenceFlow_0of4kmm</bpmn2:outgoing>
114     </bpmn2:callActivity>
115     <bpmn2:scriptTask id="PreProcessUpdateAAIGenericVNF" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
116       <bpmn2:incoming>SequenceFlow_19c7hcw</bpmn2:incoming>
117       <bpmn2:outgoing>SequenceFlow_1ltycz6</bpmn2:outgoing>
118       <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
119 def duvam = new DoUpdateVnfAndModules()
120 duvam.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
121     </bpmn2:scriptTask>
122     <bpmn2:sequenceFlow id="SequenceFlow_1f4mbkc" sourceRef="QueryVnf" targetRef="ExclusiveGateway_1amun4k" />
123   </bpmn2:process>
124   <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
125   <bpmn2:error id="Error_2" name="Java Lang Exception" errorCode="java.lang.Exception" />
126   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
127     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateVnfAndModules">
128       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_79" bpmnElement="StartEvent_1">
129         <dc:Bounds x="238" y="209" width="36" height="36" />
130         <bpmndi:BPMNLabel>
131           <dc:Bounds x="256" y="250" width="0" height="0" />
132         </bpmndi:BPMNLabel>
133       </bpmndi:BPMNShape>
134       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_311" bpmnElement="intialization">
135         <dc:Bounds x="344" y="187" width="100" height="80" />
136       </bpmndi:BPMNShape>
137       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_79" targetElement="_BPMNShape_ScriptTask_311">
138         <di:waypoint xsi:type="dc:Point" x="274" y="227" />
139         <di:waypoint xsi:type="dc:Point" x="344" y="228" />
140         <bpmndi:BPMNLabel>
141           <dc:Bounds x="309" y="212.5" width="0" height="0" />
142         </bpmndi:BPMNLabel>
143       </bpmndi:BPMNEdge>
144       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_237" bpmnElement="EndEvent_2">
145         <dc:Bounds x="1441" y="279" width="36" height="36" />
146         <bpmndi:BPMNLabel>
147           <dc:Bounds x="1459" y="320" width="0" height="0" />
148         </bpmndi:BPMNLabel>
149       </bpmndi:BPMNShape>
150       <bpmndi:BPMNShape id="_BPMNShape_SubProcess_35" bpmnElement="javaErrorHandlingSubProcess" isExpanded="true">
151         <dc:Bounds x="242" y="457" width="431" height="157" />
152       </bpmndi:BPMNShape>
153       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_81" bpmnElement="StartEvent_3">
154         <dc:Bounds x="390" y="518" width="36" height="36" />
155         <bpmndi:BPMNLabel>
156           <dc:Bounds x="408" y="559" width="0" height="0" />
157         </bpmndi:BPMNLabel>
158       </bpmndi:BPMNShape>
159       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_239" bpmnElement="EndEvent_4">
160         <dc:Bounds x="606" y="518" width="36" height="36" />
161         <bpmndi:BPMNLabel>
162           <dc:Bounds x="624" y="559" width="0" height="0" />
163         </bpmndi:BPMNLabel>
164       </bpmndi:BPMNShape>
165       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_319" bpmnElement="processJavaException">
166         <dc:Bounds x="460" y="496" width="100" height="80" />
167       </bpmndi:BPMNShape>
168       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_StartEvent_81" targetElement="_BPMNShape_ScriptTask_319">
169         <di:waypoint xsi:type="dc:Point" x="426" y="536" />
170         <di:waypoint xsi:type="dc:Point" x="460" y="536" />
171         <bpmndi:BPMNLabel>
172           <dc:Bounds x="443" y="521" width="0" height="0" />
173         </bpmndi:BPMNLabel>
174       </bpmndi:BPMNEdge>
175       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ScriptTask_319" targetElement="_BPMNShape_EndEvent_239">
176         <di:waypoint xsi:type="dc:Point" x="560" y="536" />
177         <di:waypoint xsi:type="dc:Point" x="606" y="536" />
178         <bpmndi:BPMNLabel>
179           <dc:Bounds x="583" y="521" width="0" height="0" />
180         </bpmndi:BPMNLabel>
181       </bpmndi:BPMNEdge>
182       <bpmndi:BPMNShape id="ExclusiveGateway_1amun4k_di" bpmnElement="ExclusiveGateway_1amun4k" isMarkerVisible="true">
183         <dc:Bounds x="706" y="201" width="50" height="50" />
184         <bpmndi:BPMNLabel>
185           <dc:Bounds x="660" y="248" width="65" height="36" />
186         </bpmndi:BPMNLabel>
187       </bpmndi:BPMNShape>
188       <bpmndi:BPMNEdge id="SequenceFlow_08nd69s_di" bpmnElement="SequenceFlow_08nd69s">
189         <di:waypoint xsi:type="dc:Point" x="444" y="227" />
190         <di:waypoint xsi:type="dc:Point" x="512" y="227" />
191         <bpmndi:BPMNLabel>
192           <dc:Bounds x="478" y="212" width="0" height="0" />
193         </bpmndi:BPMNLabel>
194       </bpmndi:BPMNEdge>
195       <bpmndi:BPMNEdge id="SequenceFlow_1qrkdn3_di" bpmnElement="SequenceFlow_1qrkdn3">
196         <di:waypoint xsi:type="dc:Point" x="731" y="201" />
197         <di:waypoint xsi:type="dc:Point" x="731" y="92" />
198         <di:waypoint xsi:type="dc:Point" x="816" y="92" />
199         <bpmndi:BPMNLabel>
200           <dc:Bounds x="737" y="151" width="18" height="12" />
201         </bpmndi:BPMNLabel>
202       </bpmndi:BPMNEdge>
203       <bpmndi:BPMNShape id="CallActivity_0qmp9y5_di" bpmnElement="UpdateVFModule">
204         <dc:Bounds x="983" y="52" width="100" height="80" />
205       </bpmndi:BPMNShape>
206       <bpmndi:BPMNEdge id="SequenceFlow_1p4ycii_di" bpmnElement="SequenceFlow_1p4ycii">
207         <di:waypoint xsi:type="dc:Point" x="1083" y="92" />
208         <di:waypoint xsi:type="dc:Point" x="1164" y="92" />
209         <bpmndi:BPMNLabel>
210           <dc:Bounds x="1124" y="77" width="0" height="0" />
211         </bpmndi:BPMNLabel>
212       </bpmndi:BPMNEdge>
213       <bpmndi:BPMNEdge id="SequenceFlow_0t4yszi_di" bpmnElement="SequenceFlow_0t4yszi">
214         <di:waypoint xsi:type="dc:Point" x="1214" y="132" />
215         <di:waypoint xsi:type="dc:Point" x="1214" y="226" />
216         <di:waypoint xsi:type="dc:Point" x="756" y="226" />
217         <bpmndi:BPMNLabel>
218           <dc:Bounds x="1229" y="179" width="0" height="0" />
219         </bpmndi:BPMNLabel>
220       </bpmndi:BPMNEdge>
221       <bpmndi:BPMNShape id="ScriptTask_12xsp2f_di" bpmnElement="QueryVnf">
222         <dc:Bounds x="512" y="187" width="100" height="80" />
223       </bpmndi:BPMNShape>
224       <bpmndi:BPMNShape id="ScriptTask_01c9qas_di" bpmnElement="PrepareModuleList">
225         <dc:Bounds x="816" y="52" width="100" height="80" />
226       </bpmndi:BPMNShape>
227       <bpmndi:BPMNShape id="ScriptTask_11i0rnd_di" bpmnElement="PostProcessUpdateVfModule">
228         <dc:Bounds x="1164" y="52" width="100" height="80" />
229       </bpmndi:BPMNShape>
230       <bpmndi:BPMNEdge id="SequenceFlow_04o61yk_di" bpmnElement="SequenceFlow_04o61yk">
231         <di:waypoint xsi:type="dc:Point" x="916" y="92" />
232         <di:waypoint xsi:type="dc:Point" x="983" y="92" />
233         <bpmndi:BPMNLabel>
234           <dc:Bounds x="950" y="77" width="0" height="0" />
235         </bpmndi:BPMNLabel>
236       </bpmndi:BPMNEdge>
237       <bpmndi:BPMNEdge id="SequenceFlow_19c7hcw_di" bpmnElement="SequenceFlow_19c7hcw">
238         <di:waypoint xsi:type="dc:Point" x="731" y="251" />
239         <di:waypoint xsi:type="dc:Point" x="731" y="295" />
240         <di:waypoint xsi:type="dc:Point" x="1111" y="297" />
241         <bpmndi:BPMNLabel>
242           <dc:Bounds x="908" y="273" width="12" height="12" />
243         </bpmndi:BPMNLabel>
244       </bpmndi:BPMNEdge>
245       <bpmndi:BPMNEdge id="SequenceFlow_0of4kmm_di" bpmnElement="SequenceFlow_0of4kmm">
246         <di:waypoint xsi:type="dc:Point" x="1367" y="297" />
247         <di:waypoint xsi:type="dc:Point" x="1404" y="297" />
248         <di:waypoint xsi:type="dc:Point" x="1404" y="297" />
249         <di:waypoint xsi:type="dc:Point" x="1441" y="297" />
250         <bpmndi:BPMNLabel>
251           <dc:Bounds x="1419" y="297" width="0" height="0" />
252         </bpmndi:BPMNLabel>
253       </bpmndi:BPMNEdge>
254       <bpmndi:BPMNEdge id="SequenceFlow_1ltycz6_di" bpmnElement="SequenceFlow_1ltycz6">
255         <di:waypoint xsi:type="dc:Point" x="1211" y="297" />
256         <di:waypoint xsi:type="dc:Point" x="1267" y="297" />
257         <bpmndi:BPMNLabel>
258           <dc:Bounds x="1239" y="282" width="0" height="0" />
259         </bpmndi:BPMNLabel>
260       </bpmndi:BPMNEdge>
261       <bpmndi:BPMNShape id="CallActivity_1cem00f_di" bpmnElement="UpdateAAIGenericVNFTask">
262         <dc:Bounds x="1267" y="257" width="100" height="80" />
263       </bpmndi:BPMNShape>
264       <bpmndi:BPMNShape id="ScriptTask_0snu9sv_di" bpmnElement="PreProcessUpdateAAIGenericVNF">
265         <dc:Bounds x="1111" y="257" width="100" height="80" />
266       </bpmndi:BPMNShape>
267       <bpmndi:BPMNEdge id="SequenceFlow_1f4mbkc_di" bpmnElement="SequenceFlow_1f4mbkc">
268         <di:waypoint xsi:type="dc:Point" x="612" y="227" />
269         <di:waypoint xsi:type="dc:Point" x="706" y="226" />
270         <bpmndi:BPMNLabel>
271           <dc:Bounds x="659" y="211.5" width="0" height="0" />
272         </bpmndi:BPMNLabel>
273       </bpmndi:BPMNEdge>
274     </bpmndi:BPMNPlane>
275   </bpmndi:BPMNDiagram>
276 </bpmn2:definitions>