Remove unnecessary use of Calendar.getInstance()
[so.git] / bpmn / MSOCommonBPMN / src / main / resources / subprocess / GenericGetVnf.bpmn
1 <?xml version="1.0" encoding="UTF-8"?>
2 <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_eb5eEHR6EeaJwpcpVN5gXw" exporter="camunda modeler" exporterVersion="2.7.0" targetNamespace="http://camunda.org/schema/1.0/bpmn">
3   <bpmn2:process id="GenericGetVnf" name="GenericGetVnf" isExecutable="true">
4     <bpmn2:startEvent id="StartEvent_1">
5       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
6     </bpmn2:startEvent>
7     <bpmn2:scriptTask id="intialization" name="Intialization" scriptFormat="groovy">
8       <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
9       <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
10       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
11 GenericGetVnf genericGetVnf = new GenericGetVnf ()
12 genericGetVnf.preProcessRequest(execution)
13 ]]></bpmn2:script>
14     </bpmn2:scriptTask>
15     <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization"/>
16     <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="vnfIdProvided"/>
17     <bpmn2:exclusiveGateway id="vnfIdProvided" name="Vnf Id Provided?" default="noVnfId">
18       <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
19       <bpmn2:outgoing>noVnfId</bpmn2:outgoing>
20       <bpmn2:outgoing>haveVnfId</bpmn2:outgoing>
21     </bpmn2:exclusiveGateway>
22     <bpmn2:sequenceFlow id="noVnfId" name="No" sourceRef="vnfIdProvided" targetRef="getVnfByName"/>
23     <bpmn2:sequenceFlow id="haveVnfId" name="Yes" sourceRef="vnfIdProvided" targetRef="getGenericVnf">
24       <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGV_getVnfByName") == false}]]></bpmn2:conditionExpression>
25     </bpmn2:sequenceFlow>
26     <bpmn2:scriptTask id="getVnfByName" name="GET Vnf By Name" scriptFormat="groovy">
27       <bpmn2:incoming>noVnfId</bpmn2:incoming>
28       <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
29       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
30 GenericGetVnf genericGetVnf = new GenericGetVnf()
31 genericGetVnf.getVnfByName(execution)]]></bpmn2:script>
32     </bpmn2:scriptTask>
33     <bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="getVnfByName" targetRef="ExclusiveGateway_2"/>
34     <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
35       <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
36       <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
37       <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
38     </bpmn2:exclusiveGateway>
39     <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="ExclusiveGateway_2" targetRef="toggleSuccess"/>
40     <bpmn2:scriptTask id="getGenericVnf" name="GET Vnf By&#xD;&#xA;Id" scriptFormat="groovy">
41       <bpmn2:incoming>haveVnfId</bpmn2:incoming>
42       <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
43       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
44 GenericGetVnf genericGetVnf = new GenericGetVnf()
45 genericGetVnf.getVnfById(execution)]]></bpmn2:script>
46     </bpmn2:scriptTask>
47     <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="getGenericVnf" targetRef="ExclusiveGateway_2"/>
48     <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
49       <bpmn2:endEvent id="EndEvent_3">
50         <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
51         <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_31"/>
52       </bpmn2:endEvent>
53       <bpmn2:scriptTask id="proccessBPMNError" name="Process Error" scriptFormat="groovy">
54         <bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
55         <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
56         <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
57
58 ExceptionUtil ex = new ExceptionUtil()
59 ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
60       </bpmn2:scriptTask>
61       <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="proccessBPMNError" targetRef="EndEvent_3"/>
62       <bpmn2:startEvent id="catchMSOWorkflowException">
63         <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
64         <bpmn2:errorEventDefinition id="ErrorEventDefinition_1"/>
65       </bpmn2:startEvent>
66       <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="catchMSOWorkflowException" targetRef="proccessBPMNError"/>
67     </bpmn2:subProcess>
68     <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
69       <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
70       <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
71       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
72 GenericGetVnf genericGetVnf = new GenericGetVnf()
73 genericGetVnf.setSuccessIndicator(execution, true)
74 ]]></bpmn2:script>
75     </bpmn2:scriptTask>
76     <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1"/>
77     <bpmn2:endEvent id="EndEvent_1">
78       <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
79       <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_28"/>
80     </bpmn2:endEvent>
81   </bpmn2:process>
82   <bpmn2:error id="Error_1" errorCode="MSOWorkflowException" name="MSO Workflow Exception"/>
83   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
84     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetVnf">
85       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
86         <dc:Bounds height="36.0" width="36.0" x="110.0" y="271.0"/>
87         <bpmndi:BPMNLabel>
88           <dc:Bounds height="0.0" width="0.0" x="128.0" y="312.0"/>
89         </bpmndi:BPMNLabel>
90       </bpmndi:BPMNShape>
91       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_295" bpmnElement="intialization">
92         <dc:Bounds height="80.0" width="100.0" x="228.0" y="249.0"/>
93       </bpmndi:BPMNShape>
94       <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_230" bpmnElement="vnfIdProvided" isMarkerVisible="true">
95         <dc:Bounds height="50.0" width="50.0" x="372.0" y="263.0"/>
96         <bpmndi:BPMNLabel>
97           <dc:Bounds height="22.0" width="99.0" x="419.0" y="292.0"/>
98         </bpmndi:BPMNLabel>
99       </bpmndi:BPMNShape>
100       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_295">
101         <di:waypoint xsi:type="dc:Point" x="146.0" y="289.0"/>
102         <di:waypoint xsi:type="dc:Point" x="228.0" y="289.0"/>
103       </bpmndi:BPMNEdge>
104       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_295" targetElement="_BPMNShape_ExclusiveGateway_230">
105         <di:waypoint xsi:type="dc:Point" x="328.0" y="289.0"/>
106         <di:waypoint xsi:type="dc:Point" x="372.0" y="288.0"/>
107         <bpmndi:BPMNLabel>
108           <dc:Bounds height="6.0" width="6.0" x="347.0" y="288.0"/>
109         </bpmndi:BPMNLabel>
110       </bpmndi:BPMNEdge>
111       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_296" bpmnElement="getVnfByName">
112         <dc:Bounds height="80.0" width="100.0" x="456.0" y="156.0"/>
113       </bpmndi:BPMNShape>
114       <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_231" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
115         <dc:Bounds height="50.0" width="50.0" x="600.0" y="263.0"/>
116         <bpmndi:BPMNLabel>
117           <dc:Bounds height="0.0" width="0.0" x="625.0" y="318.0"/>
118         </bpmndi:BPMNLabel>
119       </bpmndi:BPMNShape>
120       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="noVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_296">
121         <di:waypoint xsi:type="dc:Point" x="397.0" y="263.0"/>
122         <di:waypoint xsi:type="dc:Point" x="397.0" y="196.0"/>
123         <di:waypoint xsi:type="dc:Point" x="456.0" y="196.0"/>
124         <bpmndi:BPMNLabel>
125           <dc:Bounds height="22.0" width="22.0" x="399.0" y="219.0"/>
126         </bpmndi:BPMNLabel>
127       </bpmndi:BPMNEdge>
128       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="haveVnfId" sourceElement="_BPMNShape_ExclusiveGateway_230" targetElement="_BPMNShape_ScriptTask_297">
129         <di:waypoint xsi:type="dc:Point" x="397.0" y="313.0"/>
130         <di:waypoint xsi:type="dc:Point" x="397.0" y="368.0"/>
131         <di:waypoint xsi:type="dc:Point" x="456.0" y="368.0"/>
132         <bpmndi:BPMNLabel>
133           <dc:Bounds height="22.0" width="29.0" x="396.0" y="328.0"/>
134         </bpmndi:BPMNLabel>
135       </bpmndi:BPMNEdge>
136       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_297" bpmnElement="getGenericVnf">
137         <dc:Bounds height="80.0" width="100.0" x="456.0" y="328.0"/>
138       </bpmndi:BPMNShape>
139       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_298" bpmnElement="toggleSuccess">
140         <dc:Bounds height="80.0" width="100.0" x="696.0" y="249.0"/>
141       </bpmndi:BPMNShape>
142       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_226" bpmnElement="EndEvent_1">
143         <dc:Bounds height="36.0" width="36.0" x="888.0" y="271.0"/>
144         <bpmndi:BPMNLabel>
145           <dc:Bounds height="0.0" width="0.0" x="906.0" y="312.0"/>
146         </bpmndi:BPMNLabel>
147       </bpmndi:BPMNShape>
148       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ExclusiveGateway_231" targetElement="_BPMNShape_ScriptTask_298">
149         <di:waypoint xsi:type="dc:Point" x="650.0" y="288.0"/>
150         <di:waypoint xsi:type="dc:Point" x="696.0" y="289.0"/>
151         <bpmndi:BPMNLabel>
152           <dc:Bounds height="6.0" width="6.0" x="673.0" y="289.0"/>
153         </bpmndi:BPMNLabel>
154       </bpmndi:BPMNEdge>
155       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_298" targetElement="_BPMNShape_EndEvent_226">
156         <di:waypoint xsi:type="dc:Point" x="796.0" y="289.0"/>
157         <di:waypoint xsi:type="dc:Point" x="888.0" y="289.0"/>
158         <bpmndi:BPMNLabel>
159           <dc:Bounds height="6.0" width="6.0" x="829.0" y="289.0"/>
160         </bpmndi:BPMNLabel>
161       </bpmndi:BPMNEdge>
162       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_296" targetElement="_BPMNShape_ExclusiveGateway_231">
163         <di:waypoint xsi:type="dc:Point" x="556.0" y="196.0"/>
164         <di:waypoint xsi:type="dc:Point" x="625.0" y="196.0"/>
165         <di:waypoint xsi:type="dc:Point" x="625.0" y="263.0"/>
166         <bpmndi:BPMNLabel>
167           <dc:Bounds height="6.0" width="6.0" x="622.0" y="205.0"/>
168         </bpmndi:BPMNLabel>
169       </bpmndi:BPMNEdge>
170       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_297" targetElement="_BPMNShape_ExclusiveGateway_231">
171         <di:waypoint xsi:type="dc:Point" x="556.0" y="368.0"/>
172         <di:waypoint xsi:type="dc:Point" x="625.0" y="368.0"/>
173         <di:waypoint xsi:type="dc:Point" x="625.0" y="313.0"/>
174         <bpmndi:BPMNLabel>
175           <dc:Bounds height="6.0" width="6.0" x="621.0" y="368.0"/>
176         </bpmndi:BPMNLabel>
177       </bpmndi:BPMNEdge>
178       <bpmndi:BPMNShape id="_BPMNShape_SubProcess_30" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
179         <dc:Bounds height="169.0" width="313.0" x="168.0" y="468.0"/>
180       </bpmndi:BPMNShape>
181       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_74" bpmnElement="catchMSOWorkflowException">
182         <dc:Bounds height="36.0" width="36.0" x="180.0" y="535.0"/>
183         <bpmndi:BPMNLabel>
184           <dc:Bounds height="0.0" width="0.0" x="198.0" y="576.0"/>
185         </bpmndi:BPMNLabel>
186       </bpmndi:BPMNShape>
187       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_302" bpmnElement="proccessBPMNError">
188         <dc:Bounds height="80.0" width="100.0" x="275.0" y="513.0"/>
189       </bpmndi:BPMNShape>
190       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_231" bpmnElement="EndEvent_3">
191         <dc:Bounds height="36.0" width="36.0" x="432.0" y="535.0"/>
192         <bpmndi:BPMNLabel>
193           <dc:Bounds height="0.0" width="0.0" x="450.0" y="576.0"/>
194         </bpmndi:BPMNLabel>
195       </bpmndi:BPMNShape>
196       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_StartEvent_74" targetElement="_BPMNShape_ScriptTask_302">
197         <di:waypoint xsi:type="dc:Point" x="216.0" y="553.0"/>
198         <di:waypoint xsi:type="dc:Point" x="275.0" y="553.0"/>
199         <bpmndi:BPMNLabel>
200           <dc:Bounds height="6.0" width="6.0" x="238.0" y="553.0"/>
201         </bpmndi:BPMNLabel>
202       </bpmndi:BPMNEdge>
203       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_302" targetElement="_BPMNShape_EndEvent_231">
204         <di:waypoint xsi:type="dc:Point" x="375.0" y="553.0"/>
205         <di:waypoint xsi:type="dc:Point" x="432.0" y="553.0"/>
206         <bpmndi:BPMNLabel>
207           <dc:Bounds height="6.0" width="6.0" x="402.0" y="553.0"/>
208         </bpmndi:BPMNLabel>
209       </bpmndi:BPMNEdge>
210     </bpmndi:BPMNPlane>
211   </bpmndi:BPMNDiagram>
212 </bpmn2:definitions>