Merge "Removed audit code"
[so.git] / bpmn / so-bpmn-infrastructure-flows / src / main / resources / subprocess / DoDeallocateTransportNSSI.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="DoDeallocateTransportNSSI" name="DoDeallocateTransportNSSI" isExecutable="true">
4     <bpmn:startEvent id="StartEvent_1nbljfd" name="Create Deallocate 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_0ca4l8d</bpmn:incoming>
27     </bpmn:endEvent>
28     <bpmn:scriptTask id="ScriptTask_1ssh2l9" name="Prepare Update Resource Oper Status((finish)" scriptFormat="groovy">
29       <bpmn:incoming>SequenceFlow_1jygjln</bpmn:incoming>
30       <bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing>
31       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
32 def runScript = new TnAllocateNssi()
33 runScript.prepareUpdateJobStatus(execution,"finished","100","Deallocated TN NSSI 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_0rgeefb" />
37     <bpmn:scriptTask id="Activity_1tw8eyy" name="PreProcess SDNC Deallocate TN NSSI Request" scriptFormat="groovy">
38       <bpmn:incoming>SequenceFlow_07e12rt</bpmn:incoming>
39       <bpmn:outgoing>Flow_0cpctye</bpmn:outgoing>
40       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
41 def runScript = new DoDeallocateTnNssi()
42 runScript.preprocessSdncDeallocateTnNssiRequest(execution)</bpmn:script>
43     </bpmn:scriptTask>
44     <bpmn:sequenceFlow id="Flow_0cpctye" sourceRef="Activity_1tw8eyy" targetRef="Activity_0p20esb" />
45     <bpmn:callActivity id="Activity_0p20esb" name="Call SDNC Adapter: Deallocate TN NSSI" calledElement="sdncAdapter">
46       <bpmn:extensionElements>
47         <camunda:in source="TNNSSMF_SDNCRequest" target="sdncAdapterWorkflowRequest" />
48         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
49         <camunda:in source="msoRequestId" target="mso-request-id" />
50         <camunda:in source="sliceServiceInstanceId" target="mso-service-instance-id" />
51         <camunda:out source="WorkflowException" target="WorkflowException" />
52         <camunda:out source="sdncAdapterResponse" target="TNNSSMF_SDNCAdapterResponse" />
53         <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
54       </bpmn:extensionElements>
55       <bpmn:incoming>Flow_0cpctye</bpmn:incoming>
56       <bpmn:outgoing>Flow_0fuabjs</bpmn:outgoing>
57     </bpmn:callActivity>
58     <bpmn:sequenceFlow id="Flow_0fuabjs" sourceRef="Activity_0p20esb" targetRef="Activity_0phv8e5" />
59     <bpmn:scriptTask id="Activity_0phv8e5" name="Postprocess SDNC Deallocate TN NSSI  Request" scriptFormat="groovy">
60       <bpmn:incoming>Flow_0fuabjs</bpmn:incoming>
61       <bpmn:outgoing>SequenceFlow_1jdb2oq</bpmn:outgoing>
62       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
63
64 String response = execution.getVariable("TNNSSMF_SDNCAdapterResponse")
65
66 def runScript = new DoDeallocateTnNssi()
67 runScript.validateSDNCResponse(execution, response, "deallocate")</bpmn:script>
68     </bpmn:scriptTask>
69     <bpmn:scriptTask id="Activity_013rjwc" name="Delete Service Instance (TN NSSI) in AAI" scriptFormat="groovy">
70       <bpmn:incoming>SequenceFlow_1jdb2oq</bpmn:incoming>
71       <bpmn:outgoing>SequenceFlow_1jygjln</bpmn:outgoing>
72       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
73 def runScript = new DoDeallocateTnNssi()
74 runScript.deleteServiceInstance(execution)</bpmn:script>
75     </bpmn:scriptTask>
76     <bpmn:sequenceFlow id="SequenceFlow_1jdb2oq" sourceRef="Activity_0phv8e5" targetRef="Activity_013rjwc" />
77     <bpmn:scriptTask id="ScriptTask_1tc44ge" name="PreProcess Incoming Request" scriptFormat="groovy">
78       <bpmn:incoming>SequenceFlow_03s744c</bpmn:incoming>
79       <bpmn:outgoing>SequenceFlow_07e12rt</bpmn:outgoing>
80       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
81 def runScript = new DoDeallocateTnNssi()
82 runScript.preProcessRequest(execution)</bpmn:script>
83     </bpmn:scriptTask>
84     <bpmn:sequenceFlow id="SequenceFlow_07e12rt" sourceRef="ScriptTask_1tc44ge" targetRef="Activity_1tw8eyy" />
85     <bpmn:sequenceFlow id="SequenceFlow_1jygjln" sourceRef="Activity_013rjwc" targetRef="ScriptTask_1ssh2l9" />
86     <bpmn:serviceTask id="Activity_0rgeefb" name="Update Resource Operation Status">
87       <bpmn:extensionElements>
88         <camunda:connector>
89           <camunda:inputOutput>
90             <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
91             <camunda:inputParameter name="headers">
92               <camunda:map>
93                 <camunda:entry key="content-type">application/soap+xml</camunda:entry>
94                 <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
95               </camunda:map>
96             </camunda:inputParameter>
97             <camunda:inputParameter name="payload">${updateResourceOperationStatus}</camunda:inputParameter>
98             <camunda:inputParameter name="method">POST</camunda:inputParameter>
99             <camunda:outputParameter name="NSSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
100             <camunda:outputParameter name="NSSMF_dbResponse">${response}</camunda:outputParameter>
101           </camunda:inputOutput>
102           <camunda:connectorId>http-connector</camunda:connectorId>
103         </camunda:connector>
104       </bpmn:extensionElements>
105       <bpmn:incoming>SequenceFlow_1qv8qw1</bpmn:incoming>
106       <bpmn:outgoing>Flow_0ca4l8d</bpmn:outgoing>
107     </bpmn:serviceTask>
108     <bpmn:sequenceFlow id="Flow_0ca4l8d" sourceRef="Activity_0rgeefb" targetRef="EndEvent_05h01gx" />
109   </bpmn:process>
110   <bpmn:message id="Message_0c4b2r5" name="SliceServiceTask" />
111   <bpmn:error id="Error_03akl5v" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
112   <bpmn:error id="Error_0p2naox" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
113   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
114     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeallocateTransportNSSI">
115       <bpmndi:BPMNEdge id="Flow_0ca4l8d_di" bpmnElement="Flow_0ca4l8d">
116         <di:waypoint x="840" y="350" />
117         <di:waypoint x="1022" y="350" />
118       </bpmndi:BPMNEdge>
119       <bpmndi:BPMNEdge id="Flow_1jygjln_di" bpmnElement="SequenceFlow_1jygjln">
120         <di:waypoint x="360" y="350" />
121         <di:waypoint x="520" y="350" />
122       </bpmndi:BPMNEdge>
123       <bpmndi:BPMNEdge id="SequenceFlow_07e12rt_di" bpmnElement="SequenceFlow_07e12rt">
124         <di:waypoint x="385" y="121" />
125         <di:waypoint x="509" y="121" />
126       </bpmndi:BPMNEdge>
127       <bpmndi:BPMNEdge id="Flow_1jdb2oq_di" bpmnElement="SequenceFlow_1jdb2oq">
128         <di:waypoint x="1080" y="121" />
129         <di:waypoint x="1220" y="121" />
130         <di:waypoint x="1220" y="230" />
131         <di:waypoint x="310" y="230" />
132         <di:waypoint x="310" y="310" />
133       </bpmndi:BPMNEdge>
134       <bpmndi:BPMNEdge id="Flow_0fuabjs_di" bpmnElement="Flow_0fuabjs">
135         <di:waypoint x="850" y="121" />
136         <di:waypoint x="959" y="121" />
137       </bpmndi:BPMNEdge>
138       <bpmndi:BPMNEdge id="Flow_0cpctye_di" bpmnElement="Flow_0cpctye">
139         <di:waypoint x="630" y="121" />
140         <di:waypoint x="729" y="121" />
141       </bpmndi:BPMNEdge>
142       <bpmndi:BPMNEdge id="SequenceFlow_1qv8qw1_di" bpmnElement="SequenceFlow_1qv8qw1">
143         <di:waypoint x="620" y="350" />
144         <di:waypoint x="740" y="350" />
145       </bpmndi:BPMNEdge>
146       <bpmndi:BPMNEdge id="SequenceFlow_03s744c_di" bpmnElement="SequenceFlow_03s744c">
147         <di:waypoint x="214" y="121" />
148         <di:waypoint x="285" y="121" />
149       </bpmndi:BPMNEdge>
150       <bpmndi:BPMNShape id="StartEvent_1nbljfd_di" bpmnElement="StartEvent_1nbljfd">
151         <dc:Bounds x="178" y="103" width="36" height="36" />
152         <bpmndi:BPMNLabel>
153           <dc:Bounds x="166" y="146" width="70" height="53" />
154         </bpmndi:BPMNLabel>
155       </bpmndi:BPMNShape>
156       <bpmndi:BPMNShape id="ScriptTask_1ssh2l9_di" bpmnElement="ScriptTask_1ssh2l9">
157         <dc:Bounds x="520" y="310" width="100" height="80" />
158       </bpmndi:BPMNShape>
159       <bpmndi:BPMNShape id="Activity_0rgeefb_di" bpmnElement="Activity_0rgeefb">
160         <dc:Bounds x="740" y="310" width="100" height="80" />
161       </bpmndi:BPMNShape>
162       <bpmndi:BPMNShape id="EndEvent_05h01gx_di" bpmnElement="EndEvent_05h01gx">
163         <dc:Bounds x="1022" y="332" width="36" height="36" />
164         <bpmndi:BPMNLabel>
165           <dc:Bounds x="1030" y="375" width="20" height="14" />
166         </bpmndi:BPMNLabel>
167       </bpmndi:BPMNShape>
168       <bpmndi:BPMNShape id="SubProcess_1yv9i68_di" bpmnElement="SubProcess_1yv9i68" isExpanded="true">
169         <dc:Bounds x="685" y="1080" width="781" height="196" />
170       </bpmndi:BPMNShape>
171       <bpmndi:BPMNEdge id="SequenceFlow_08mlzwz_di" bpmnElement="SequenceFlow_08mlzwz">
172         <di:waypoint x="1079" y="1184" />
173         <di:waypoint x="1353" y="1184" />
174       </bpmndi:BPMNEdge>
175       <bpmndi:BPMNEdge id="SequenceFlow_1w67v6s_di" bpmnElement="SequenceFlow_1w67v6s">
176         <di:waypoint x="751" y="1184" />
177         <di:waypoint x="979" y="1184" />
178       </bpmndi:BPMNEdge>
179       <bpmndi:BPMNShape id="StartEvent_1omdx56_di" bpmnElement="StartEvent_1omdx56">
180         <dc:Bounds x="715" y="1166" width="36" height="36" />
181       </bpmndi:BPMNShape>
182       <bpmndi:BPMNShape id="EndEvent_1jx3026_di" bpmnElement="EndEvent_1jx3026">
183         <dc:Bounds x="1353" y="1166" width="36" height="36" />
184       </bpmndi:BPMNShape>
185       <bpmndi:BPMNShape id="ScriptTask_1swzdpw_di" bpmnElement="ScriptTask_1swzdpw">
186         <dc:Bounds x="979" y="1144" width="100" height="80" />
187       </bpmndi:BPMNShape>
188       <bpmndi:BPMNShape id="Activity_1tw8eyy_di" bpmnElement="Activity_1tw8eyy">
189         <dc:Bounds x="509" y="74" width="121" height="94" />
190       </bpmndi:BPMNShape>
191       <bpmndi:BPMNShape id="Activity_0p20esb_di" bpmnElement="Activity_0p20esb">
192         <dc:Bounds x="729" y="74" width="121" height="94" />
193       </bpmndi:BPMNShape>
194       <bpmndi:BPMNShape id="Activity_0phv8e5_di" bpmnElement="Activity_0phv8e5">
195         <dc:Bounds x="959" y="74" width="121" height="94" />
196       </bpmndi:BPMNShape>
197       <bpmndi:BPMNShape id="Activity_013rjwc_di" bpmnElement="Activity_013rjwc">
198         <dc:Bounds x="260" y="310" width="100" height="80" />
199       </bpmndi:BPMNShape>
200       <bpmndi:BPMNShape id="ScriptTask_1tc44ge_di" bpmnElement="ScriptTask_1tc44ge">
201         <dc:Bounds x="285" y="81" width="100" height="80" />
202       </bpmndi:BPMNShape>
203     </bpmndi:BPMNPlane>
204   </bpmndi:BPMNDiagram>
205 </bpmn:definitions>