SO changes for Service Intent
[so.git] / bpmn / so-bpmn-infrastructure-flows / src / main / resources / subprocess / DoCloudLeasedLineDelete.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="DoCloudLeasedLineDelete" name="DoCloudLeasedLineDelete" isExecutable="true">
4     <bpmn:startEvent id="StartEvent_1nbljfd" name="Create Cloud Leased Line Deletion 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 DoCloudLeasedLineDelete()
33 runScript.prepareUpdateJobStatus(execution,"FINISHED","100","Deleted CLL 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 Delete CLL Request" scriptFormat="groovy">
38       <bpmn:incoming>Flow_0sj0mtu</bpmn:incoming>
39       <bpmn:outgoing>Flow_0cpctye</bpmn:outgoing>
40       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
41 def runScript = new DoCloudLeasedLineDelete()
42 runScript.preprocessSdncDeleteCllRequest(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: Delete CLL" calledElement="sdncAdapter">
46       <bpmn:extensionElements>
47         <camunda:in source="CLL_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="CLL_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 Delete CLL  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("CLL_SDNCAdapterResponse")
65
66 def runScript = new DoCloudLeasedLineDelete()
67 runScript.validateSDNCResponse(execution, response, "deallocate")</bpmn:script>
68     </bpmn:scriptTask>
69     <bpmn:scriptTask id="Activity_013rjwc" name="Delete Service Instance (CLL) in AAI" scriptFormat="groovy">
70       <bpmn:incoming>SequenceFlow_1jdb2oq</bpmn:incoming>
71       <bpmn:incoming>Flow_0dirb5b</bpmn:incoming>
72       <bpmn:outgoing>SequenceFlow_1jygjln</bpmn:outgoing>
73       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
74 def runScript = new DoCloudLeasedLineDelete()
75 runScript.deleteServiceInstance(execution)</bpmn:script>
76     </bpmn:scriptTask>
77     <bpmn:sequenceFlow id="SequenceFlow_1jdb2oq" sourceRef="Activity_0phv8e5" targetRef="Activity_013rjwc" />
78     <bpmn:scriptTask id="ScriptTask_1tc44ge" name="PreProcess Incoming Request" scriptFormat="groovy">
79       <bpmn:incoming>SequenceFlow_03s744c</bpmn:incoming>
80       <bpmn:outgoing>SequenceFlow_07e12rt</bpmn:outgoing>
81       <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
82 def runScript = new DoCloudLeasedLineDelete()
83 runScript.preProcessRequest(execution)</bpmn:script>
84     </bpmn:scriptTask>
85     <bpmn:sequenceFlow id="SequenceFlow_07e12rt" sourceRef="ScriptTask_1tc44ge" targetRef="Gateway_1spi9lo" />
86     <bpmn:sequenceFlow id="SequenceFlow_1jygjln" sourceRef="Activity_013rjwc" targetRef="ScriptTask_1ssh2l9" />
87     <bpmn:serviceTask id="Activity_0rgeefb" name="Update Resource Operation Status">
88       <bpmn:extensionElements>
89         <camunda:connector>
90           <camunda:inputOutput>
91             <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
92             <camunda:inputParameter name="headers">
93               <camunda:map>
94                 <camunda:entry key="content-type">application/soap+xml</camunda:entry>
95                 <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
96               </camunda:map>
97             </camunda:inputParameter>
98             <camunda:inputParameter name="payload">${updateResourceOperationStatus}</camunda:inputParameter>
99             <camunda:inputParameter name="method">POST</camunda:inputParameter>
100             <camunda:outputParameter name="NSSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
101             <camunda:outputParameter name="NSSMF_dbResponse">${response}</camunda:outputParameter>
102           </camunda:inputOutput>
103           <camunda:connectorId>http-connector</camunda:connectorId>
104         </camunda:connector>
105       </bpmn:extensionElements>
106       <bpmn:incoming>SequenceFlow_1qv8qw1</bpmn:incoming>
107       <bpmn:outgoing>Flow_0ca4l8d</bpmn:outgoing>
108     </bpmn:serviceTask>
109     <bpmn:sequenceFlow id="Flow_0ca4l8d" sourceRef="Activity_0rgeefb" targetRef="EndEvent_05h01gx" />
110     <bpmn:exclusiveGateway id="Gateway_1spi9lo" name="Enable SDNC?">
111       <bpmn:incoming>SequenceFlow_07e12rt</bpmn:incoming>
112       <bpmn:outgoing>Flow_0sj0mtu</bpmn:outgoing>
113       <bpmn:outgoing>Flow_0dirb5b</bpmn:outgoing>
114     </bpmn:exclusiveGateway>
115     <bpmn:sequenceFlow id="Flow_0sj0mtu" name="Yes" sourceRef="Gateway_1spi9lo" targetRef="Activity_1tw8eyy">
116       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("enableSdnc" )  == true)}</bpmn:conditionExpression>
117     </bpmn:sequenceFlow>
118     <bpmn:sequenceFlow id="Flow_0dirb5b" name="No" sourceRef="Gateway_1spi9lo" targetRef="Activity_013rjwc" />
119   </bpmn:process>
120   <bpmn:message id="Message_0c4b2r5" name="SliceServiceTask" />
121   <bpmn:error id="Error_03akl5v" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
122   <bpmn:error id="Error_0p2naox" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
123   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
124     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCloudLeasedLineDelete">
125       <bpmndi:BPMNEdge id="Flow_0dirb5b_di" bpmnElement="Flow_0dirb5b">
126         <di:waypoint x="480" y="146" />
127         <di:waypoint x="480" y="370" />
128         <bpmndi:BPMNLabel>
129           <dc:Bounds x="483" y="166" width="14" height="14" />
130         </bpmndi:BPMNLabel>
131       </bpmndi:BPMNEdge>
132       <bpmndi:BPMNEdge id="Flow_0sj0mtu_di" bpmnElement="Flow_0sj0mtu">
133         <di:waypoint x="505" y="121" />
134         <di:waypoint x="569" y="121" />
135         <bpmndi:BPMNLabel>
136           <dc:Bounds x="529" y="103" width="19" height="14" />
137         </bpmndi:BPMNLabel>
138       </bpmndi:BPMNEdge>
139       <bpmndi:BPMNEdge id="Flow_0ca4l8d_di" bpmnElement="Flow_0ca4l8d">
140         <di:waypoint x="1030" y="410" />
141         <di:waypoint x="1152" y="410" />
142       </bpmndi:BPMNEdge>
143       <bpmndi:BPMNEdge id="Flow_1jygjln_di" bpmnElement="SequenceFlow_1jygjln">
144         <di:waypoint x="530" y="410" />
145         <di:waypoint x="660" y="410" />
146       </bpmndi:BPMNEdge>
147       <bpmndi:BPMNEdge id="SequenceFlow_07e12rt_di" bpmnElement="SequenceFlow_07e12rt">
148         <di:waypoint x="385" y="121" />
149         <di:waypoint x="455" y="121" />
150       </bpmndi:BPMNEdge>
151       <bpmndi:BPMNEdge id="Flow_1jdb2oq_di" bpmnElement="SequenceFlow_1jdb2oq">
152         <di:waypoint x="1130" y="121" />
153         <di:waypoint x="1220" y="121" />
154         <di:waypoint x="1220" y="260" />
155         <di:waypoint x="480" y="260" />
156         <di:waypoint x="480" y="370" />
157       </bpmndi:BPMNEdge>
158       <bpmndi:BPMNEdge id="Flow_0fuabjs_di" bpmnElement="Flow_0fuabjs">
159         <di:waypoint x="910" y="121" />
160         <di:waypoint x="1009" y="121" />
161       </bpmndi:BPMNEdge>
162       <bpmndi:BPMNEdge id="Flow_0cpctye_di" bpmnElement="Flow_0cpctye">
163         <di:waypoint x="690" y="121" />
164         <di:waypoint x="789" y="121" />
165       </bpmndi:BPMNEdge>
166       <bpmndi:BPMNEdge id="SequenceFlow_1qv8qw1_di" bpmnElement="SequenceFlow_1qv8qw1">
167         <di:waypoint x="760" y="410" />
168         <di:waypoint x="930" y="410" />
169       </bpmndi:BPMNEdge>
170       <bpmndi:BPMNEdge id="SequenceFlow_03s744c_di" bpmnElement="SequenceFlow_03s744c">
171         <di:waypoint x="214" y="121" />
172         <di:waypoint x="285" y="121" />
173       </bpmndi:BPMNEdge>
174       <bpmndi:BPMNShape id="StartEvent_1nbljfd_di" bpmnElement="StartEvent_1nbljfd">
175         <dc:Bounds x="178" y="103" width="36" height="36" />
176         <bpmndi:BPMNLabel>
177           <dc:Bounds x="169" y="146" width="70" height="53" />
178         </bpmndi:BPMNLabel>
179       </bpmndi:BPMNShape>
180       <bpmndi:BPMNShape id="SubProcess_1yv9i68_di" bpmnElement="SubProcess_1yv9i68" isExpanded="true">
181         <dc:Bounds x="685" y="1080" width="781" height="196" />
182       </bpmndi:BPMNShape>
183       <bpmndi:BPMNEdge id="SequenceFlow_08mlzwz_di" bpmnElement="SequenceFlow_08mlzwz">
184         <di:waypoint x="1079" y="1184" />
185         <di:waypoint x="1353" y="1184" />
186       </bpmndi:BPMNEdge>
187       <bpmndi:BPMNEdge id="SequenceFlow_1w67v6s_di" bpmnElement="SequenceFlow_1w67v6s">
188         <di:waypoint x="751" y="1184" />
189         <di:waypoint x="979" y="1184" />
190       </bpmndi:BPMNEdge>
191       <bpmndi:BPMNShape id="StartEvent_1omdx56_di" bpmnElement="StartEvent_1omdx56">
192         <dc:Bounds x="715" y="1166" width="36" height="36" />
193       </bpmndi:BPMNShape>
194       <bpmndi:BPMNShape id="EndEvent_1jx3026_di" bpmnElement="EndEvent_1jx3026">
195         <dc:Bounds x="1353" y="1166" width="36" height="36" />
196       </bpmndi:BPMNShape>
197       <bpmndi:BPMNShape id="ScriptTask_1swzdpw_di" bpmnElement="ScriptTask_1swzdpw">
198         <dc:Bounds x="979" y="1144" width="100" height="80" />
199       </bpmndi:BPMNShape>
200       <bpmndi:BPMNShape id="EndEvent_05h01gx_di" bpmnElement="EndEvent_05h01gx">
201         <dc:Bounds x="1152" y="392" width="36" height="36" />
202         <bpmndi:BPMNLabel>
203           <dc:Bounds x="1160" y="435" width="20" height="14" />
204         </bpmndi:BPMNLabel>
205       </bpmndi:BPMNShape>
206       <bpmndi:BPMNShape id="ScriptTask_1ssh2l9_di" bpmnElement="ScriptTask_1ssh2l9">
207         <dc:Bounds x="660" y="370" width="100" height="80" />
208       </bpmndi:BPMNShape>
209       <bpmndi:BPMNShape id="Activity_1tw8eyy_di" bpmnElement="Activity_1tw8eyy">
210         <dc:Bounds x="569" y="74" width="121" height="94" />
211       </bpmndi:BPMNShape>
212       <bpmndi:BPMNShape id="Activity_0p20esb_di" bpmnElement="Activity_0p20esb">
213         <dc:Bounds x="789" y="74" width="121" height="94" />
214       </bpmndi:BPMNShape>
215       <bpmndi:BPMNShape id="Activity_0phv8e5_di" bpmnElement="Activity_0phv8e5">
216         <dc:Bounds x="1009" y="74" width="121" height="94" />
217       </bpmndi:BPMNShape>
218       <bpmndi:BPMNShape id="Activity_013rjwc_di" bpmnElement="Activity_013rjwc">
219         <dc:Bounds x="430" y="370" width="100" height="80" />
220       </bpmndi:BPMNShape>
221       <bpmndi:BPMNShape id="ScriptTask_1tc44ge_di" bpmnElement="ScriptTask_1tc44ge">
222         <dc:Bounds x="285" y="81" width="100" height="80" />
223       </bpmndi:BPMNShape>
224       <bpmndi:BPMNShape id="Activity_0rgeefb_di" bpmnElement="Activity_0rgeefb">
225         <dc:Bounds x="930" y="370" width="100" height="80" />
226       </bpmndi:BPMNShape>
227       <bpmndi:BPMNShape id="Gateway_1spi9lo_di" bpmnElement="Gateway_1spi9lo" isMarkerVisible="true">
228         <dc:Bounds x="455" y="96" width="50" height="50" />
229         <bpmndi:BPMNLabel>
230           <dc:Bounds x="443" y="73" width="75" height="14" />
231         </bpmndi:BPMNLabel>
232       </bpmndi:BPMNShape>
233     </bpmndi:BPMNPlane>
234   </bpmndi:BPMNDiagram>
235 </bpmn:definitions>