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_0x9ttcz" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.1">
3 <bpmn:process id="Delete_xAPP_Test" isExecutable="true">
4 <bpmn:startEvent id="StartEvent_0cebtfp" camunda:asyncBefore="true">
5 <bpmn:outgoing>SequenceFlow_03vt4gu</bpmn:outgoing>
7 <bpmn:scriptTask id="verify" name="Verify Inputs" scriptFormat="JavaScript">
8 <bpmn:incoming>SequenceFlow_03vt4gu</bpmn:incoming>
9 <bpmn:outgoing>SequenceFlow_1gceb7d</bpmn:outgoing>
10 <bpmn:script>var System = java.lang.System
12 var deleteVthId = 'delete'
13 var testData = execution.getVariable("testData")
14 var vthInput = execution.getVariable("vthInput")
15 var validInput = false;
16 var testResultMessage = "";
20 var appName = testData['appName'];
22 if(typeof appName !== 'string' || appName.trim() === ''){
23 System.out.println("appName is not a string, or empty string")
24 throw Error("appName is not a string, or empty string")
30 vthInput[deleteVthId].name = appName
33 System.out.println(err)
35 testResultMessage = "Invalid input params. error: " + err;
36 execution.setVariable("testResult", "FAILED");
39 execution.setVariable("validInput", validInput)
40 execution.setVariable("testResultMessage", testResultMessage)</bpmn:script>
42 <bpmn:exclusiveGateway id="ExclusiveGateway_04n8k6e" default="SequenceFlow_035k1kv">
43 <bpmn:incoming>SequenceFlow_1gceb7d</bpmn:incoming>
44 <bpmn:outgoing>SequenceFlow_1xykozf</bpmn:outgoing>
45 <bpmn:outgoing>SequenceFlow_035k1kv</bpmn:outgoing>
46 </bpmn:exclusiveGateway>
47 <bpmn:sequenceFlow id="SequenceFlow_03vt4gu" sourceRef="StartEvent_0cebtfp" targetRef="verify" />
48 <bpmn:sequenceFlow id="SequenceFlow_1gceb7d" sourceRef="verify" targetRef="ExclusiveGateway_04n8k6e" />
49 <bpmn:sequenceFlow id="SequenceFlow_1xykozf" name="To Delete" sourceRef="ExclusiveGateway_04n8k6e" targetRef="delete">
50 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${validInput}</bpmn:conditionExpression>
52 <bpmn:scriptTask id="ScriptTask_1d0llw5" name="Mark Test Failure" scriptFormat="JavaScript">
53 <bpmn:incoming>SequenceFlow_035k1kv</bpmn:incoming>
54 <bpmn:incoming>SequenceFlow_11htm0z</bpmn:incoming>
55 <bpmn:outgoing>SequenceFlow_1ivi698</bpmn:outgoing>
56 <bpmn:script>execution.setVariable("testResult", "FAILED")</bpmn:script>
58 <bpmn:scriptTask id="ScriptTask_0zeodmx" name="Mark Test Success" scriptFormat="JavaScript">
59 <bpmn:incoming>SequenceFlow_1fcorq2</bpmn:incoming>
60 <bpmn:outgoing>SequenceFlow_1s62i1u</bpmn:outgoing>
61 <bpmn:script>execution.setVariable("testResult", "SUCCESS")</bpmn:script>
63 <bpmn:endEvent id="EndEvent_0wf03rq">
64 <bpmn:incoming>SequenceFlow_1czqxne</bpmn:incoming>
65 <bpmn:terminateEventDefinition id="TerminateEventDefinition_1o1stwj" />
67 <bpmn:sequenceFlow id="SequenceFlow_1ivi698" sourceRef="ScriptTask_1d0llw5" targetRef="ServiceTask_0yfqtmz" />
68 <bpmn:sequenceFlow id="SequenceFlow_1s62i1u" sourceRef="ScriptTask_0zeodmx" targetRef="ServiceTask_0yfqtmz" />
69 <bpmn:sequenceFlow id="SequenceFlow_1czqxne" sourceRef="ServiceTask_0yfqtmz" targetRef="EndEvent_0wf03rq" />
70 <bpmn:exclusiveGateway id="ExclusiveGateway_0df2lf1" default="SequenceFlow_11htm0z">
71 <bpmn:incoming>SequenceFlow_1hq011g</bpmn:incoming>
72 <bpmn:outgoing>SequenceFlow_1fcorq2</bpmn:outgoing>
73 <bpmn:outgoing>SequenceFlow_11htm0z</bpmn:outgoing>
74 </bpmn:exclusiveGateway>
75 <bpmn:sequenceFlow id="SequenceFlow_1rdc2w4" sourceRef="delete" targetRef="checkDelete" />
76 <bpmn:sequenceFlow id="SequenceFlow_1fcorq2" name="Deleted" sourceRef="ExclusiveGateway_0df2lf1" targetRef="ScriptTask_0zeodmx">
77 <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${deleted}</bpmn:conditionExpression>
79 <bpmn:sequenceFlow id="SequenceFlow_035k1kv" sourceRef="ExclusiveGateway_04n8k6e" targetRef="ScriptTask_1d0llw5" />
80 <bpmn:sequenceFlow id="SequenceFlow_11htm0z" sourceRef="ExclusiveGateway_0df2lf1" targetRef="ScriptTask_1d0llw5" />
81 <bpmn:scriptTask id="checkDelete" name="Verify Delete" scriptFormat="JavaScript">
82 <bpmn:incoming>SequenceFlow_1rdc2w4</bpmn:incoming>
83 <bpmn:outgoing>SequenceFlow_1hq011g</bpmn:outgoing>
84 <bpmn:script>var System = java.lang.System
86 var deleteVthId = 'delete'
87 var testData = execution.getVariable("testData")
88 var vthInput = execution.getVariable("vthInput")
90 var testResultMessage = "RIC VTH reported that the xapp was not deleted."
95 //get output from delete call
96 var testExecution = execution.getVariable('otf-execution-testExecution');
98 testExecution.testHeadResults.forEach(function(item, index, array) {
99 if(item.bpmnVthTaskId == deleteVthId ){
100 data = item['testHeadResponse']['vthResponse']['resultData']['statusCode'];
106 testResultMessage = "RIC VTH reported that the xapp was deleted."
114 execution.setVariable("deleted", deleted);
115 execution.setVariable("testResultMessage", testResultMessage);</bpmn:script>
117 <bpmn:sequenceFlow id="SequenceFlow_1hq011g" sourceRef="checkDelete" targetRef="ExclusiveGateway_0df2lf1" />
118 <bpmn:task id="ServiceTask_0yfqtmz" name="UTIL:LogTestResult">
119 <bpmn:incoming>SequenceFlow_1ivi698</bpmn:incoming>
120 <bpmn:incoming>SequenceFlow_1s62i1u</bpmn:incoming>
121 <bpmn:outgoing>SequenceFlow_1czqxne</bpmn:outgoing>
123 <bpmn:task id="delete" name="LVTH:RIC:Delete">
124 <bpmn:incoming>SequenceFlow_1xykozf</bpmn:incoming>
125 <bpmn:outgoing>SequenceFlow_1rdc2w4</bpmn:outgoing>
128 <bpmndi:BPMNDiagram id="BPMNDiagram_1">
129 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Delete_xAPP_Test">
130 <bpmndi:BPMNShape id="StartEvent_0cebtfp_di" bpmnElement="StartEvent_0cebtfp">
131 <dc:Bounds x="156" y="103" width="36" height="36" />
133 <bpmndi:BPMNShape id="ScriptTask_0rqy7r1_di" bpmnElement="verify">
134 <dc:Bounds x="234" y="81" width="100" height="80" />
136 <bpmndi:BPMNShape id="ExclusiveGateway_04n8k6e_di" bpmnElement="ExclusiveGateway_04n8k6e" isMarkerVisible="true">
137 <dc:Bounds x="385" y="96" width="50" height="50" />
139 <bpmndi:BPMNEdge id="SequenceFlow_03vt4gu_di" bpmnElement="SequenceFlow_03vt4gu">
140 <di:waypoint x="192" y="121" />
141 <di:waypoint x="234" y="121" />
143 <bpmndi:BPMNEdge id="SequenceFlow_1gceb7d_di" bpmnElement="SequenceFlow_1gceb7d">
144 <di:waypoint x="334" y="121" />
145 <di:waypoint x="385" y="121" />
147 <bpmndi:BPMNEdge id="SequenceFlow_1xykozf_di" bpmnElement="SequenceFlow_1xykozf">
148 <di:waypoint x="435" y="121" />
149 <di:waypoint x="489" y="121" />
151 <dc:Bounds x="434" y="100" width="46" height="14" />
154 <bpmndi:BPMNShape id="ScriptTask_1d0llw5_di" bpmnElement="ScriptTask_1d0llw5">
155 <dc:Bounds x="749" y="336" width="100" height="80" />
157 <bpmndi:BPMNShape id="ScriptTask_0zeodmx_di" bpmnElement="ScriptTask_0zeodmx">
158 <dc:Bounds x="878" y="81" width="100" height="80" />
160 <bpmndi:BPMNShape id="EndEvent_0wf03rq_di" bpmnElement="EndEvent_0wf03rq">
161 <dc:Bounds x="1169" y="103" width="36" height="36" />
163 <bpmndi:BPMNEdge id="SequenceFlow_1ivi698_di" bpmnElement="SequenceFlow_1ivi698">
164 <di:waypoint x="849" y="376" />
165 <di:waypoint x="1065" y="376" />
166 <di:waypoint x="1065" y="161" />
168 <bpmndi:BPMNEdge id="SequenceFlow_1s62i1u_di" bpmnElement="SequenceFlow_1s62i1u">
169 <di:waypoint x="978" y="121" />
170 <di:waypoint x="1015" y="121" />
172 <bpmndi:BPMNEdge id="SequenceFlow_1czqxne_di" bpmnElement="SequenceFlow_1czqxne">
173 <di:waypoint x="1115" y="121" />
174 <di:waypoint x="1169" y="121" />
176 <bpmndi:BPMNShape id="ExclusiveGateway_0df2lf1_di" bpmnElement="ExclusiveGateway_0df2lf1" isMarkerVisible="true">
177 <dc:Bounds x="774" y="96" width="50" height="50" />
179 <bpmndi:BPMNEdge id="SequenceFlow_1rdc2w4_di" bpmnElement="SequenceFlow_1rdc2w4">
180 <di:waypoint x="589" y="121" />
181 <di:waypoint x="629" y="121" />
183 <bpmndi:BPMNEdge id="SequenceFlow_1fcorq2_di" bpmnElement="SequenceFlow_1fcorq2">
184 <di:waypoint x="824" y="121" />
185 <di:waypoint x="878" y="121" />
187 <dc:Bounds x="827" y="99" width="38" height="14" />
190 <bpmndi:BPMNEdge id="SequenceFlow_035k1kv_di" bpmnElement="SequenceFlow_035k1kv">
191 <di:waypoint x="410" y="146" />
192 <di:waypoint x="410" y="376" />
193 <di:waypoint x="749" y="376" />
195 <bpmndi:BPMNEdge id="SequenceFlow_11htm0z_di" bpmnElement="SequenceFlow_11htm0z">
196 <di:waypoint x="799" y="146" />
197 <di:waypoint x="799" y="336" />
199 <bpmndi:BPMNShape id="ScriptTask_0td2q01_di" bpmnElement="checkDelete">
200 <dc:Bounds x="629" y="81" width="100" height="80" />
202 <bpmndi:BPMNEdge id="SequenceFlow_1hq011g_di" bpmnElement="SequenceFlow_1hq011g">
203 <di:waypoint x="729" y="121" />
204 <di:waypoint x="774" y="121" />
206 <bpmndi:BPMNShape id="Task_1tklwc0_di" bpmnElement="ServiceTask_0yfqtmz">
207 <dc:Bounds x="1015" y="81" width="100" height="80" />
209 <bpmndi:BPMNShape id="Task_026zsim_di" bpmnElement="delete">
210 <dc:Bounds x="489" y="81" width="100" height="80" />
213 </bpmndi:BPMNDiagram>