Fixes for bugs found in Transport Slicing integration
[so.git] / bpmn / so-bpmn-infrastructure-flows / src / main / resources / subprocess / DoActivateTransportNSSI.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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1wio50w" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.1.1">
3   <bpmn:process id="DoActivateTransportNSSI" name="DoActivateTransportNSSI" isExecutable="true">
4     <bpmn:startEvent id="StartEvent_1nbljfd" name="Create Activate/Deactivate TN NSSMF Work Flow">
5       <bpmn:outgoing>SequenceFlow_03s744c</bpmn:outgoing>
6     </bpmn:startEvent>
7     <bpmn:subProcess id="SubProcess_1yv9i68" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
8       <bpmn:startEvent id="StartEvent_1omdx56">
9         <bpmn:outgoing>SequenceFlow_1w67v6s</bpmn:outgoing>
10         <bpmn:errorEventDefinition id="ErrorEventDefinition_06xcioh" />
11       </bpmn:startEvent>
12       <bpmn:endEvent id="EndEvent_1jx3026">
13         <bpmn:incoming>SequenceFlow_08mlzwz</bpmn:incoming>
14       </bpmn:endEvent>
15       <bpmn:scriptTask id="ScriptTask_1swzdpw" name="Handle Unexpected Error" scriptFormat="groovy">
16         <bpmn:incoming>SequenceFlow_1w67v6s</bpmn:incoming>
17         <bpmn:outgoing>SequenceFlow_08mlzwz</bpmn:outgoing>
18         <bpmn:script>import org.onap.so.bpmn.common.scripts.*
19 ExceptionUtil ex = new ExceptionUtil()
20 ex.processJavaException(execution)</bpmn:script>
21       </bpmn:scriptTask>
22       <bpmn:sequenceFlow id="SequenceFlow_1w67v6s" sourceRef="StartEvent_1omdx56" targetRef="ScriptTask_1swzdpw" />
23       <bpmn:sequenceFlow id="SequenceFlow_08mlzwz" sourceRef="ScriptTask_1swzdpw" targetRef="EndEvent_1jx3026" />
24     </bpmn:subProcess>
25     <bpmn:endEvent id="EndEvent_05h01gx" name="End">
26       <bpmn:incoming>Flow_1032bi1</bpmn:incoming>
27     </bpmn:endEvent>
28     <bpmn:scriptTask id="ScriptTask_1ssh2l9" name="Prepare Update Resource Oper Status((finish)" scriptFormat="groovy">
29       <bpmn:incoming>SequenceFlow_0kixzdj</bpmn:incoming>
30       <bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
31       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
32 def runScript = new DoActivateTnNssi()
33 runScript.prepareUpdateJobStatus(execution,"finished","100","Activate or Deactivate successfully")</bpmn:script>
34     </bpmn:scriptTask>
35     <bpmn:sequenceFlow id="SequenceFlow_03s744c" sourceRef="StartEvent_1nbljfd" targetRef="ScriptTask_1tc44ge" />
36     <bpmn:sequenceFlow id="SequenceFlow_1qv8qw1" sourceRef="ScriptTask_1ssh2l9" targetRef="Activity_0nhxd67" />
37     <bpmn:scriptTask id="ScriptTask_19uxoi8" name="Update AAI Status" scriptFormat="groovy">
38       <bpmn:incoming>SequenceFlow_1jdb2oq</bpmn:incoming>
39       <bpmn:outgoing>SequenceFlow_0kixzdj</bpmn:outgoing>
40       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
41 def actionType = execution.getVariable("actionType")
42 execution.setVariable("orchestrationStatus", actionType)
43 def runScript = new DoActivateTnNssi()
44 runScript.updateAAIOrchStatus(execution)</bpmn:script>
45     </bpmn:scriptTask>
46     <bpmn:sequenceFlow id="SequenceFlow_0kixzdj" sourceRef="ScriptTask_19uxoi8" targetRef="ScriptTask_1ssh2l9" />
47     <bpmn:scriptTask id="Activity_1tw8eyy" name="PreProcess SDNC Activate or Deactivate TN NSSI Request" scriptFormat="groovy">
48       <bpmn:incoming>SequenceFlow_07e12rt</bpmn:incoming>
49       <bpmn:outgoing>Flow_0cpctye</bpmn:outgoing>
50       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
51 def runScript = new DoActivateTnNssi()
52 runScript.preprocessSdncActOrDeactTnNssiRequest(execution)</bpmn:script>
53     </bpmn:scriptTask>
54     <bpmn:sequenceFlow id="Flow_0cpctye" sourceRef="Activity_1tw8eyy" targetRef="Activity_0p20esb" />
55     <bpmn:callActivity id="Activity_0p20esb" name="Call SDNC Adapter: Activate/Deactivate TN NSSI" calledElement="sdncAdapter">
56       <bpmn:extensionElements>
57         <camunda:in source="TNNSSMF_SDNCRequest" target="sdncAdapterWorkflowRequest" />
58         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
59         <camunda:in source="msoRequestId" target="mso-request-id" />
60         <camunda:in source="sliceServiceInstanceId" target="mso-service-instance-id" />
61         <camunda:out source="WorkflowException" target="WorkflowException" />
62         <camunda:out source="sdncAdapterResponse" target="TNNSSMF_SDNCAdapterResponse" />
63         <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
64       </bpmn:extensionElements>
65       <bpmn:incoming>Flow_0cpctye</bpmn:incoming>
66       <bpmn:outgoing>Flow_0fuabjs</bpmn:outgoing>
67     </bpmn:callActivity>
68     <bpmn:sequenceFlow id="Flow_0fuabjs" sourceRef="Activity_0p20esb" targetRef="Activity_0phv8e5" />
69     <bpmn:scriptTask id="Activity_0phv8e5" name="Postprocess SDNC Activate/Deactivate TN NSSI  Request" scriptFormat="groovy">
70       <bpmn:incoming>Flow_0fuabjs</bpmn:incoming>
71       <bpmn:outgoing>SequenceFlow_1jdb2oq</bpmn:outgoing>
72       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
73
74 String response = execution.getVariable("TNNSSMF_SDNCAdapterResponse")
75
76 def runScript = new DoActivateTnNssi()
77 runScript.validateSDNCResponse(execution, response)</bpmn:script>
78     </bpmn:scriptTask>
79     <bpmn:sequenceFlow id="SequenceFlow_1jdb2oq" sourceRef="Activity_0phv8e5" targetRef="ScriptTask_19uxoi8" />
80     <bpmn:scriptTask id="ScriptTask_1tc44ge" name="PreProcess Incoming Request" scriptFormat="groovy">
81       <bpmn:incoming>SequenceFlow_03s744c</bpmn:incoming>
82       <bpmn:outgoing>SequenceFlow_07e12rt</bpmn:outgoing>
83       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
84 def runScript = new DoActivateTnNssi()
85 runScript.preProcessRequest(execution)</bpmn:script>
86     </bpmn:scriptTask>
87     <bpmn:sequenceFlow id="SequenceFlow_07e12rt" sourceRef="ScriptTask_1tc44ge" targetRef="Activity_1tw8eyy" />
88     <bpmn:serviceTask id="Activity_0nhxd67" name="Update Resource Operation Status">
89       <bpmn:extensionElements>
90         <camunda:connector>
91           <camunda:inputOutput>
92             <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
93             <camunda:inputParameter name="headers">
94               <camunda:map>
95                 <camunda:entry key="content-type">application/soap+xml</camunda:entry>
96                 <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
97               </camunda:map>
98             </camunda:inputParameter>
99             <camunda:inputParameter name="payload">${updateResourceOperationStatus}</camunda:inputParameter>
100             <camunda:inputParameter name="method">POST</camunda:inputParameter>
101             <camunda:outputParameter name="NSSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
102             <camunda:outputParameter name="NSSMF_dbResponse">${response}</camunda:outputParameter>
103           </camunda:inputOutput>
104           <camunda:connectorId>http-connector</camunda:connectorId>
105         </camunda:connector>
106       </bpmn:extensionElements>
107       <bpmn:incoming>SequenceFlow_1qv8qw1</bpmn:incoming>
108       <bpmn:outgoing>Flow_1032bi1</bpmn:outgoing>
109     </bpmn:serviceTask>
110     <bpmn:sequenceFlow id="Flow_1032bi1" sourceRef="Activity_0nhxd67" targetRef="EndEvent_05h01gx" />
111   </bpmn:process>
112   <bpmn:message id="Message_0c4b2r5" name="SliceServiceTask" />
113   <bpmn:error id="Error_03akl5v" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
114   <bpmn:error id="Error_0p2naox" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
115   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
116     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoActivateTransportNSSI">
117       <bpmndi:BPMNEdge id="SequenceFlow_07e12rt_di" bpmnElement="SequenceFlow_07e12rt">
118         <di:waypoint x="385" y="121" />
119         <di:waypoint x="509" y="121" />
120       </bpmndi:BPMNEdge>
121       <bpmndi:BPMNEdge id="Flow_1jdb2oq_di" bpmnElement="SequenceFlow_1jdb2oq">
122         <di:waypoint x="1080" y="121" />
123         <di:waypoint x="1220" y="121" />
124         <di:waypoint x="1220" y="210" />
125         <di:waypoint x="335" y="210" />
126         <di:waypoint x="335" y="310" />
127       </bpmndi:BPMNEdge>
128       <bpmndi:BPMNEdge id="Flow_0fuabjs_di" bpmnElement="Flow_0fuabjs">
129         <di:waypoint x="850" y="121" />
130         <di:waypoint x="959" y="121" />
131       </bpmndi:BPMNEdge>
132       <bpmndi:BPMNEdge id="Flow_0cpctye_di" bpmnElement="Flow_0cpctye">
133         <di:waypoint x="630" y="121" />
134         <di:waypoint x="729" y="121" />
135       </bpmndi:BPMNEdge>
136       <bpmndi:BPMNEdge id="SequenceFlow_0kixzdj_di" bpmnElement="SequenceFlow_0kixzdj">
137         <di:waypoint x="385" y="350" />
138         <di:waypoint x="530" y="350" />
139       </bpmndi:BPMNEdge>
140       <bpmndi:BPMNEdge id="SequenceFlow_1qv8qw1_di" bpmnElement="SequenceFlow_1qv8qw1">
141         <di:waypoint x="630" y="350" />
142         <di:waypoint x="740" y="350" />
143       </bpmndi:BPMNEdge>
144       <bpmndi:BPMNEdge id="SequenceFlow_03s744c_di" bpmnElement="SequenceFlow_03s744c">
145         <di:waypoint x="214" y="121" />
146         <di:waypoint x="285" y="121" />
147       </bpmndi:BPMNEdge>
148       <bpmndi:BPMNEdge id="Flow_1032bi1_di" bpmnElement="Flow_1032bi1">
149         <di:waypoint x="840" y="350" />
150         <di:waypoint x="1002" y="350" />
151       </bpmndi:BPMNEdge>
152       <bpmndi:BPMNShape id="StartEvent_1nbljfd_di" bpmnElement="StartEvent_1nbljfd">
153         <dc:Bounds x="178" y="103" width="36" height="36" />
154         <bpmndi:BPMNLabel>
155           <dc:Bounds x="163" y="146" width="81" height="53" />
156         </bpmndi:BPMNLabel>
157       </bpmndi:BPMNShape>
158       <bpmndi:BPMNShape id="Activity_0nhxd67_di" bpmnElement="Activity_0nhxd67">
159         <dc:Bounds x="740" y="310" width="100" height="80" />
160       </bpmndi:BPMNShape>
161       <bpmndi:BPMNShape id="SubProcess_1yv9i68_di" bpmnElement="SubProcess_1yv9i68" isExpanded="true">
162         <dc:Bounds x="685" y="1080" width="781" height="196" />
163       </bpmndi:BPMNShape>
164       <bpmndi:BPMNEdge id="SequenceFlow_08mlzwz_di" bpmnElement="SequenceFlow_08mlzwz">
165         <di:waypoint x="1079" y="1184" />
166         <di:waypoint x="1353" y="1184" />
167       </bpmndi:BPMNEdge>
168       <bpmndi:BPMNEdge id="SequenceFlow_1w67v6s_di" bpmnElement="SequenceFlow_1w67v6s">
169         <di:waypoint x="751" y="1184" />
170         <di:waypoint x="979" y="1184" />
171       </bpmndi:BPMNEdge>
172       <bpmndi:BPMNShape id="StartEvent_1omdx56_di" bpmnElement="StartEvent_1omdx56">
173         <dc:Bounds x="715" y="1166" width="36" height="36" />
174       </bpmndi:BPMNShape>
175       <bpmndi:BPMNShape id="EndEvent_1jx3026_di" bpmnElement="EndEvent_1jx3026">
176         <dc:Bounds x="1353" y="1166" width="36" height="36" />
177       </bpmndi:BPMNShape>
178       <bpmndi:BPMNShape id="ScriptTask_1swzdpw_di" bpmnElement="ScriptTask_1swzdpw">
179         <dc:Bounds x="979" y="1144" width="100" height="80" />
180       </bpmndi:BPMNShape>
181       <bpmndi:BPMNShape id="EndEvent_05h01gx_di" bpmnElement="EndEvent_05h01gx">
182         <dc:Bounds x="1002" y="332" width="36" height="36" />
183         <bpmndi:BPMNLabel>
184           <dc:Bounds x="1010" y="375" width="20" height="14" />
185         </bpmndi:BPMNLabel>
186       </bpmndi:BPMNShape>
187       <bpmndi:BPMNShape id="ScriptTask_1ssh2l9_di" bpmnElement="ScriptTask_1ssh2l9">
188         <dc:Bounds x="530" y="310" width="100" height="80" />
189       </bpmndi:BPMNShape>
190       <bpmndi:BPMNShape id="ScriptTask_19uxoi8_di" bpmnElement="ScriptTask_19uxoi8">
191         <dc:Bounds x="285" y="310" width="100" height="80" />
192       </bpmndi:BPMNShape>
193       <bpmndi:BPMNShape id="Activity_1tw8eyy_di" bpmnElement="Activity_1tw8eyy">
194         <dc:Bounds x="509" y="74" width="121" height="94" />
195       </bpmndi:BPMNShape>
196       <bpmndi:BPMNShape id="Activity_0p20esb_di" bpmnElement="Activity_0p20esb">
197         <dc:Bounds x="729" y="74" width="121" height="94" />
198       </bpmndi:BPMNShape>
199       <bpmndi:BPMNShape id="Activity_0phv8e5_di" bpmnElement="Activity_0phv8e5">
200         <dc:Bounds x="959" y="74" width="121" height="94" />
201       </bpmndi:BPMNShape>
202       <bpmndi:BPMNShape id="ScriptTask_1tc44ge_di" bpmnElement="ScriptTask_1tc44ge">
203         <dc:Bounds x="285" y="81" width="100" height="80" />
204       </bpmndi:BPMNShape>
205     </bpmndi:BPMNPlane>
206   </bpmndi:BPMNDiagram>
207 </bpmn:definitions>