45ebfb9664339f89b893e48e62ae8f053447b248
[so.git] / bpmn / so-bpmn-infrastructure-flows / src / main / resources / subprocess / DoAllocateCoreNSSI.bpmn
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_19c8rxx" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.0.0">
3   <bpmn:process id="DoAllocateCoreNSSI" name="DoAllocateCoreNSSI" isExecutable="true">
4     <bpmn:startEvent id="allocateNSSI_startEvent" name="Start">
5       <bpmn:outgoing>SequenceFlow_0bjz7up</bpmn:outgoing>
6     </bpmn:startEvent>
7     <bpmn:sequenceFlow id="SequenceFlow_0bjz7up" sourceRef="allocateNSSI_startEvent" targetRef="processRequest_ScriptTask" />
8     <bpmn:sequenceFlow id="SequenceFlow_1xiszom" sourceRef="processRequest_ScriptTask" targetRef="ScriptTask_13krb7d" />
9     <bpmn:sequenceFlow id="SequenceFlow_1r5aycw" sourceRef="ScriptTask_0ybe0w9" targetRef="Activity_16u5d39" />
10     <bpmn:exclusiveGateway id="ExclusiveGateway_1xjahhp" default="SequenceFlow_1scva4p">
11       <bpmn:incoming>Flow_0kbpihh</bpmn:incoming>
12       <bpmn:outgoing>SequenceFlow_1scva4p</bpmn:outgoing>
13       <bpmn:outgoing>SequenceFlow_1ygklb8</bpmn:outgoing>
14     </bpmn:exclusiveGateway>
15     <bpmn:sequenceFlow id="SequenceFlow_1scva4p" name="No Existing &#10;s-nssai" sourceRef="ExclusiveGateway_1xjahhp" targetRef="CallActivity_0ue7vug" />
16     <bpmn:sequenceFlow id="SequenceFlow_1ygklb8" sourceRef="ExclusiveGateway_1xjahhp" targetRef="CallActivity_0e6drr2">
17       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("solutions") !="" }</bpmn:conditionExpression>
18     </bpmn:sequenceFlow>
19     <bpmn:sequenceFlow id="SequenceFlow_0enouyb" sourceRef="ScriptTask_13krb7d" targetRef="ScriptTask_0ybe0w9" />
20     <bpmn:endEvent id="EndEvent_1e80uuk" name="End">
21       <bpmn:incoming>SequenceFlow_0tytimn</bpmn:incoming>
22       <bpmn:incoming>SequenceFlow_0tubodn</bpmn:incoming>
23     </bpmn:endEvent>
24     <bpmn:scriptTask id="processRequest_ScriptTask" name="Preprocess request" scriptFormat="groovy">
25       <bpmn:incoming>SequenceFlow_0bjz7up</bpmn:incoming>
26       <bpmn:outgoing>SequenceFlow_1xiszom</bpmn:outgoing>
27       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
28 def allocateNssi = new DoAllocateCoreNSSI()
29 allocateNssi.preProcessRequest(execution)</bpmn:script>
30     </bpmn:scriptTask>
31     <bpmn:scriptTask id="ScriptTask_13krb7d" name="Get NSST name from CatalogDB" scriptFormat="groovy">
32       <bpmn:incoming>SequenceFlow_1xiszom</bpmn:incoming>
33       <bpmn:outgoing>SequenceFlow_0enouyb</bpmn:outgoing>
34       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
35 def allocateNssi = new DoAllocateCoreNSSI()
36 allocateNssi.getNSSTName(execution)</bpmn:script>
37     </bpmn:scriptTask>
38     <bpmn:scriptTask id="ScriptTask_0ybe0w9" name="Prepare OOF request" scriptFormat="groovy">
39       <bpmn:incoming>SequenceFlow_0enouyb</bpmn:incoming>
40       <bpmn:outgoing>SequenceFlow_1r5aycw</bpmn:outgoing>
41       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
42 def allocateNssi = new DoAllocateCoreNSSI()
43 allocateNssi.prepareOOFRequest(execution)</bpmn:script>
44     </bpmn:scriptTask>
45     <bpmn:callActivity id="CallActivity_0ue7vug" name="Call non-shared slice flow" calledElement="DoAllocateCoreNonSharedSlice">
46       <bpmn:extensionElements>
47         <camunda:in source="coreServiceInstanceId" target="serviceInstanceId" />
48         <camunda:in source="networkServiceModelInfo" target="networkServiceModelInfo" />
49         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
50         <camunda:in source="modelInvariantUuid" target="modelInvariantUuid" />
51         <camunda:in source="nsstName" target="nsstName" />
52         <camunda:in source="modelUuid" target="modelUuid" />
53         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
54         <camunda:out source="WorkflowException" target="WorkflowException" />
55         <camunda:in source="jobId" target="jobId" />
56         <camunda:in source="nsiId" target="nsiId" />
57         <camunda:in source="sliceParams" target="sliceParams" />
58         <camunda:in source="servicename" target="servicename" />
59         <camunda:in source="msoRequestId" target="msoRequestId" />
60         <camunda:in source="sliceProfile" target="sliceProfile" />
61       </bpmn:extensionElements>
62       <bpmn:incoming>SequenceFlow_1scva4p</bpmn:incoming>
63       <bpmn:outgoing>SequenceFlow_0tubodn</bpmn:outgoing>
64     </bpmn:callActivity>
65     <bpmn:callActivity id="CallActivity_0e6drr2" name="Call shared slice flow&#10;" calledElement="DoAllocateCoreSharedSlice">
66       <bpmn:extensionElements>
67         <camunda:in source="solutions" target="solutions" />
68         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
69         <camunda:in source="modelInvariantUuid" target="modelInvariantUuid" />
70         <camunda:in source="nsstName" target="nsstName" />
71         <camunda:in source="dummyServiceId" target="dummyServiceId" />
72         <camunda:in source="networkServiceModelInfo" target="networkServiceModelInfo" />
73         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
74         <camunda:in source="modelUuid" target="modelUuid" />
75         <camunda:out source="WorkflowException" target="WorkflowException" />
76         <camunda:in source="nsiId" target="nsiId" />
77         <camunda:in source="sliceParams" target="sliceParams" />
78         <camunda:in source="servicename" target="servicename" />
79         <camunda:in source="msoRequestId" target="msoRequestId" />
80         <camunda:in source="sliceProfile" target="sliceProfile" />
81         <camunda:in source="jobId" target="jobId" />
82       </bpmn:extensionElements>
83       <bpmn:incoming>SequenceFlow_1ygklb8</bpmn:incoming>
84       <bpmn:outgoing>SequenceFlow_0tytimn</bpmn:outgoing>
85     </bpmn:callActivity>
86     <bpmn:sequenceFlow id="SequenceFlow_0tytimn" sourceRef="CallActivity_0e6drr2" targetRef="EndEvent_1e80uuk" />
87     <bpmn:sequenceFlow id="SequenceFlow_0tubodn" sourceRef="CallActivity_0ue7vug" targetRef="EndEvent_1e80uuk" />
88     <bpmn:callActivity id="Activity_16u5d39" name="Call DoHandleOofRequest" calledElement="DoHandleOofRequest">
89       <bpmn:extensionElements>
90         <camunda:in source="NSSI_apiPath" target="apiPath" />
91         <camunda:in source="NSSI_correlator" target="correlator" />
92         <camunda:in source="NSSI_messageType" target="messageType" />
93         <camunda:in source="NSSI_timeout" target="timeout" />
94         <camunda:in source="NSSI_oofRequest" target="oofRequest" />
95         <camunda:out source="WorkflowException" target="WorkflowException" />
96         <camunda:out source="asyncCallbackResponse" target="NSSI_asyncCallbackResponse" />
97       </bpmn:extensionElements>
98       <bpmn:incoming>SequenceFlow_1r5aycw</bpmn:incoming>
99       <bpmn:outgoing>Flow_1navrbe</bpmn:outgoing>
100     </bpmn:callActivity>
101     <bpmn:sequenceFlow id="Flow_1navrbe" sourceRef="Activity_16u5d39" targetRef="ScriptTask_1bg09vu" />
102     <bpmn:scriptTask id="ScriptTask_1bg09vu" name="Process OOF Async&#10;ressponse" scriptFormat="groovy">
103       <bpmn:incoming>Flow_1navrbe</bpmn:incoming>
104       <bpmn:outgoing>Flow_0kbpihh</bpmn:outgoing>
105       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
106 def allocateNssi = new DoAllocateCoreNSSI()
107 allocateNssi.processOOFAsyncResponse(execution)</bpmn:script>
108     </bpmn:scriptTask>
109     <bpmn:sequenceFlow id="Flow_0kbpihh" sourceRef="ScriptTask_1bg09vu" targetRef="ExclusiveGateway_1xjahhp" />
110     <bpmn:subProcess id="Activity_0nliikd" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
111       <bpmn:startEvent id="Event_0jeyy28">
112         <bpmn:outgoing>Flow_1bd9s44</bpmn:outgoing>
113         <bpmn:errorEventDefinition id="ErrorEventDefinition_00bn0ig" />
114       </bpmn:startEvent>
115       <bpmn:endEvent id="Event_0f5seph">
116         <bpmn:incoming>Flow_1rrkw3k</bpmn:incoming>
117       </bpmn:endEvent>
118       <bpmn:scriptTask id="Activity_016fs4l" name="Handle Unexpected Error" scriptFormat="groovy">
119         <bpmn:incoming>Flow_1jn84pa</bpmn:incoming>
120         <bpmn:outgoing>Flow_1rrkw3k</bpmn:outgoing>
121         <bpmn:script>import org.onap.so.bpmn.common.scripts.*
122 ExceptionUtil ex = new ExceptionUtil()
123 ex.processJavaException(execution)</bpmn:script>
124       </bpmn:scriptTask>
125       <bpmn:scriptTask id="Activity_1wmb5hd" name="Prepare Resource Operation Status Update" scriptFormat="groovy">
126         <bpmn:incoming>Flow_1bd9s44</bpmn:incoming>
127         <bpmn:outgoing>Flow_167qlhy</bpmn:outgoing>
128         <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
129 def allocateNssi= new DoAllocateCoreNSSI()
130 allocateNssi.prepareFailedOperationStatusUpdate(execution)</bpmn:script>
131       </bpmn:scriptTask>
132       <bpmn:serviceTask id="Activity_0frxrqx" name="Update Resource Operation Status">
133         <bpmn:extensionElements>
134           <camunda:connector>
135             <camunda:inputOutput>
136               <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
137               <camunda:inputParameter name="headers">
138                 <camunda:map>
139                   <camunda:entry key="content-type">application/soap+xml</camunda:entry>
140                   <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
141                 </camunda:map>
142               </camunda:inputParameter>
143               <camunda:inputParameter name="payload">${updateResourceOperationStatus}</camunda:inputParameter>
144               <camunda:inputParameter name="method">POST</camunda:inputParameter>
145               <camunda:outputParameter name="NSSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
146               <camunda:outputParameter name="NSSMF_dbResponse">${response}</camunda:outputParameter>
147             </camunda:inputOutput>
148             <camunda:connectorId>http-connector</camunda:connectorId>
149           </camunda:connector>
150         </bpmn:extensionElements>
151         <bpmn:incoming>Flow_167qlhy</bpmn:incoming>
152         <bpmn:outgoing>Flow_1jn84pa</bpmn:outgoing>
153       </bpmn:serviceTask>
154       <bpmn:sequenceFlow id="Flow_1jn84pa" sourceRef="Activity_0frxrqx" targetRef="Activity_016fs4l" />
155       <bpmn:sequenceFlow id="Flow_167qlhy" sourceRef="Activity_1wmb5hd" targetRef="Activity_0frxrqx" />
156       <bpmn:sequenceFlow id="Flow_1bd9s44" sourceRef="Event_0jeyy28" targetRef="Activity_1wmb5hd" />
157       <bpmn:sequenceFlow id="Flow_1rrkw3k" sourceRef="Activity_016fs4l" targetRef="Event_0f5seph" />
158     </bpmn:subProcess>
159   </bpmn:process>
160   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
161     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateCoreNSSI">
162       <bpmndi:BPMNEdge id="Flow_0kbpihh_di" bpmnElement="Flow_0kbpihh">
163         <di:waypoint x="868" y="180" />
164         <di:waypoint x="929" y="180" />
165         <bpmndi:BPMNLabel>
166           <dc:Bounds x="753.5" y="155" width="90" height="20" />
167         </bpmndi:BPMNLabel>
168       </bpmndi:BPMNEdge>
169       <bpmndi:BPMNEdge id="Flow_1navrbe_di" bpmnElement="Flow_1navrbe">
170         <di:waypoint x="735" y="180" />
171         <di:waypoint x="768" y="180" />
172       </bpmndi:BPMNEdge>
173       <bpmndi:BPMNEdge id="SequenceFlow_0tubodn_di" bpmnElement="SequenceFlow_0tubodn">
174         <di:waypoint x="1096" y="115" />
175         <di:waypoint x="1136" y="115" />
176         <di:waypoint x="1136" y="184" />
177         <di:waypoint x="1176" y="184" />
178         <bpmndi:BPMNLabel>
179           <dc:Bounds x="1051" y="143.5" width="0" height="12" />
180         </bpmndi:BPMNLabel>
181       </bpmndi:BPMNEdge>
182       <bpmndi:BPMNEdge id="SequenceFlow_0tytimn_di" bpmnElement="SequenceFlow_0tytimn">
183         <di:waypoint x="1096" y="266" />
184         <di:waypoint x="1136" y="266" />
185         <di:waypoint x="1136" y="184" />
186         <di:waypoint x="1176" y="184" />
187         <bpmndi:BPMNLabel>
188           <dc:Bounds x="1051" y="219" width="0" height="12" />
189         </bpmndi:BPMNLabel>
190       </bpmndi:BPMNEdge>
191       <bpmndi:BPMNEdge id="SequenceFlow_0enouyb_di" bpmnElement="SequenceFlow_0enouyb">
192         <di:waypoint x="468" y="184" />
193         <di:waypoint x="501" y="184" />
194         <bpmndi:BPMNLabel>
195           <dc:Bounds x="339.5" y="163" width="90" height="12" />
196         </bpmndi:BPMNLabel>
197       </bpmndi:BPMNEdge>
198       <bpmndi:BPMNEdge id="SequenceFlow_1ygklb8_di" bpmnElement="SequenceFlow_1ygklb8">
199         <di:waypoint x="954" y="205" />
200         <di:waypoint x="954" y="266" />
201         <di:waypoint x="996" y="266" />
202         <bpmndi:BPMNLabel>
203           <dc:Bounds x="824" y="229.5" width="90" height="12" />
204         </bpmndi:BPMNLabel>
205       </bpmndi:BPMNEdge>
206       <bpmndi:BPMNEdge id="SequenceFlow_1scva4p_di" bpmnElement="SequenceFlow_1scva4p">
207         <di:waypoint x="954" y="155" />
208         <di:waypoint x="954" y="115" />
209         <di:waypoint x="996" y="115" />
210         <bpmndi:BPMNLabel>
211           <dc:Bounds x="897" y="116" width="56" height="27" />
212         </bpmndi:BPMNLabel>
213       </bpmndi:BPMNEdge>
214       <bpmndi:BPMNEdge id="SequenceFlow_1r5aycw_di" bpmnElement="SequenceFlow_1r5aycw">
215         <di:waypoint x="601" y="184" />
216         <di:waypoint x="635" y="184" />
217         <bpmndi:BPMNLabel>
218           <dc:Bounds x="470.5" y="163" width="90" height="12" />
219         </bpmndi:BPMNLabel>
220       </bpmndi:BPMNEdge>
221       <bpmndi:BPMNEdge id="SequenceFlow_1xiszom_di" bpmnElement="SequenceFlow_1xiszom">
222         <di:waypoint x="343" y="184" />
223         <di:waypoint x="368" y="184" />
224         <bpmndi:BPMNLabel>
225           <dc:Bounds x="210.5" y="163" width="90" height="12" />
226         </bpmndi:BPMNLabel>
227       </bpmndi:BPMNEdge>
228       <bpmndi:BPMNEdge id="SequenceFlow_0bjz7up_di" bpmnElement="SequenceFlow_0bjz7up">
229         <di:waypoint x="195" y="184" />
230         <di:waypoint x="243" y="184" />
231         <bpmndi:BPMNLabel>
232           <dc:Bounds x="74" y="163" width="90" height="12" />
233         </bpmndi:BPMNLabel>
234       </bpmndi:BPMNEdge>
235       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="allocateNSSI_startEvent">
236         <dc:Bounds x="159" y="166" width="36" height="36" />
237         <bpmndi:BPMNLabel>
238           <dc:Bounds x="166" y="209" width="25" height="14" />
239         </bpmndi:BPMNLabel>
240       </bpmndi:BPMNShape>
241       <bpmndi:BPMNShape id="ExclusiveGateway_1xjahhp_di" bpmnElement="ExclusiveGateway_1xjahhp" isMarkerVisible="true">
242         <dc:Bounds x="929" y="155" width="50" height="50" />
243         <bpmndi:BPMNLabel>
244           <dc:Bounds x="975" y="284" width="90" height="12" />
245         </bpmndi:BPMNLabel>
246       </bpmndi:BPMNShape>
247       <bpmndi:BPMNShape id="EndEvent_1e80uuk_di" bpmnElement="EndEvent_1e80uuk">
248         <dc:Bounds x="1176" y="166" width="36" height="36" />
249         <bpmndi:BPMNLabel>
250           <dc:Bounds x="1184" y="209" width="20" height="14" />
251         </bpmndi:BPMNLabel>
252       </bpmndi:BPMNShape>
253       <bpmndi:BPMNShape id="Activity_1eo0wn0_di" bpmnElement="processRequest_ScriptTask">
254         <dc:Bounds x="243" y="144" width="100" height="80" />
255       </bpmndi:BPMNShape>
256       <bpmndi:BPMNShape id="Activity_0cs9cfh_di" bpmnElement="ScriptTask_13krb7d">
257         <dc:Bounds x="368" y="144" width="100" height="80" />
258       </bpmndi:BPMNShape>
259       <bpmndi:BPMNShape id="Activity_1v669aj_di" bpmnElement="ScriptTask_0ybe0w9">
260         <dc:Bounds x="501" y="144" width="100" height="80" />
261       </bpmndi:BPMNShape>
262       <bpmndi:BPMNShape id="Activity_04schfi_di" bpmnElement="CallActivity_0ue7vug">
263         <dc:Bounds x="996" y="75" width="100" height="80" />
264       </bpmndi:BPMNShape>
265       <bpmndi:BPMNShape id="Activity_1vy16mp_di" bpmnElement="CallActivity_0e6drr2">
266         <dc:Bounds x="996" y="226" width="100" height="80" />
267       </bpmndi:BPMNShape>
268       <bpmndi:BPMNShape id="Activity_16u5d39_di" bpmnElement="Activity_16u5d39">
269         <dc:Bounds x="635" y="144" width="100" height="80" />
270       </bpmndi:BPMNShape>
271       <bpmndi:BPMNShape id="Activity_19cc8m2_di" bpmnElement="ScriptTask_1bg09vu">
272         <dc:Bounds x="768" y="140" width="100" height="80" />
273       </bpmndi:BPMNShape>
274       <bpmndi:BPMNShape id="Activity_0nliikd_di" bpmnElement="Activity_0nliikd" isExpanded="true">
275         <dc:Bounds x="300" y="360" width="781" height="196" />
276       </bpmndi:BPMNShape>
277       <bpmndi:BPMNEdge id="Flow_1rrkw3k_di" bpmnElement="Flow_1rrkw3k">
278         <di:waypoint x="860" y="464" />
279         <di:waypoint x="968" y="464" />
280       </bpmndi:BPMNEdge>
281       <bpmndi:BPMNEdge id="Flow_1bd9s44_di" bpmnElement="Flow_1bd9s44">
282         <di:waypoint x="366" y="464" />
283         <di:waypoint x="430" y="464" />
284       </bpmndi:BPMNEdge>
285       <bpmndi:BPMNEdge id="Flow_167qlhy_di" bpmnElement="Flow_167qlhy">
286         <di:waypoint x="530" y="464" />
287         <di:waypoint x="590" y="464" />
288       </bpmndi:BPMNEdge>
289       <bpmndi:BPMNEdge id="Flow_1jn84pa_di" bpmnElement="Flow_1jn84pa">
290         <di:waypoint x="690" y="464" />
291         <di:waypoint x="760" y="464" />
292       </bpmndi:BPMNEdge>
293       <bpmndi:BPMNShape id="Event_0jeyy28_di" bpmnElement="Event_0jeyy28">
294         <dc:Bounds x="330" y="446" width="36" height="36" />
295       </bpmndi:BPMNShape>
296       <bpmndi:BPMNShape id="Event_0f5seph_di" bpmnElement="Event_0f5seph">
297         <dc:Bounds x="968" y="446" width="36" height="36" />
298       </bpmndi:BPMNShape>
299       <bpmndi:BPMNShape id="Activity_016fs4l_di" bpmnElement="Activity_016fs4l">
300         <dc:Bounds x="760" y="424" width="100" height="80" />
301       </bpmndi:BPMNShape>
302       <bpmndi:BPMNShape id="Activity_1wmb5hd_di" bpmnElement="Activity_1wmb5hd">
303         <dc:Bounds x="430" y="424" width="100" height="80" />
304       </bpmndi:BPMNShape>
305       <bpmndi:BPMNShape id="Activity_0frxrqx_di" bpmnElement="Activity_0frxrqx">
306         <dc:Bounds x="590" y="424" width="100" height="80" />
307       </bpmndi:BPMNShape>
308     </bpmndi:BPMNPlane>
309   </bpmndi:BPMNDiagram>
310 </bpmn:definitions>