AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOCommonBPMN / src / main / resources / subprocess / BuildingBlock / RainyDayHandler.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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
3   <bpmn2:process id="RainyDayHandler" name="RainyDayHandler" isExecutable="true">
4     <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
5       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
6     </bpmn2:startEvent>
7     <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
8     <bpmn2:endEvent id="EndEvent_3">
9       <bpmn2:incoming>SequenceFlow_0uwsjoh</bpmn2:incoming>
10       <bpmn2:incoming>SequenceFlow_1f0bjoy</bpmn2:incoming>
11     </bpmn2:endEvent>
12     <bpmn2:subProcess id="SubProcess_06d8lk8" name="Java Exception Handling Sub Process" triggeredByEvent="true">
13       <bpmn2:startEvent id="StartEvent_0yljq9y">
14         <bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
15         <bpmn2:errorEventDefinition />
16       </bpmn2:startEvent>
17       <bpmn2:endEvent id="EndEvent_117lkk3">
18         <bpmn2:incoming>SequenceFlow_0g4aus9</bpmn2:incoming>
19       </bpmn2:endEvent>
20       <bpmn2:sequenceFlow id="SequenceFlow_0tgrn11" sourceRef="StartEvent_0yljq9y" targetRef="processJavaError" />
21       <bpmn2:scriptTask id="processJavaError" name="Process Error" scriptFormat="groovy">
22         <bpmn2:incoming>SequenceFlow_0tgrn11</bpmn2:incoming>
23         <bpmn2:outgoing>SequenceFlow_0g4aus9</bpmn2:outgoing>
24         <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
25 ExceptionUtil exceptionUtil = new ExceptionUtil()
26 exceptionUtil.processJavaException(execution)]]></bpmn2:script>
27       </bpmn2:scriptTask>
28       <bpmn2:sequenceFlow id="SequenceFlow_0g4aus9" sourceRef="processJavaError" targetRef="EndEvent_117lkk3" />
29     </bpmn2:subProcess>
30     <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
31       <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
32       <bpmn2:outgoing>SequenceFlow_0yxffj2</bpmn2:outgoing>
33       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
34 def rdh = new RainyDayHandler()
35 rdh.preProcessRequest(execution)
36 ]]></bpmn2:script>
37     </bpmn2:scriptTask>
38     <bpmn2:sequenceFlow id="SequenceFlow_0yxffj2" sourceRef="preProcessRequest_ScriptTask" targetRef="QueryPolicyEngine" />
39     <bpmn2:sequenceFlow id="SequenceFlow_12vj619" sourceRef="QueryPolicyEngine" targetRef="ExclusiveGateway_0kqwevj" />
40     <bpmn2:scriptTask id="QueryPolicyEngine" name="Query Policy " scriptFormat="groovy">
41       <bpmn2:incoming>SequenceFlow_0yxffj2</bpmn2:incoming>
42       <bpmn2:outgoing>SequenceFlow_12vj619</bpmn2:outgoing>
43       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
44 def rdh = new RainyDayHandler()
45 rdh.queryPolicy(execution)]]></bpmn2:script>
46     </bpmn2:scriptTask>
47     <bpmn2:exclusiveGateway id="ExclusiveGateway_0kqwevj" name="Is Manual Handling Requested?" default="SequenceFlow_0uwsjoh">
48       <bpmn2:incoming>SequenceFlow_12vj619</bpmn2:incoming>
49       <bpmn2:outgoing>SequenceFlow_0uwsjoh</bpmn2:outgoing>
50       <bpmn2:outgoing>SequenceFlow_0navei4</bpmn2:outgoing>
51     </bpmn2:exclusiveGateway>
52     <bpmn2:sequenceFlow id="SequenceFlow_0uwsjoh" name="no" sourceRef="ExclusiveGateway_0kqwevj" targetRef="EndEvent_3" />
53     <bpmn2:sequenceFlow id="SequenceFlow_0navei4" name="yes" sourceRef="ExclusiveGateway_0kqwevj" targetRef="Task_1qu3p0x">
54       <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("handlingCode") == "Manual"]]></bpmn2:conditionExpression>
55     </bpmn2:sequenceFlow>
56     <bpmn2:callActivity id="Task_1qu3p0x" name="Manual Handling" calledElement="ManualHandling">
57       <bpmn2:extensionElements>
58         <camunda:in source="msoRequestId" target="msoRequestId" />
59         <camunda:in source="serviceType" target="serviceType" />
60         <camunda:in source="vnfType" target="vnfType" />
61         <camunda:in source="requestorId" target="requestorId" />
62         <camunda:in source="currentActivity" target="currentActivity" />
63         <camunda:in source="failedActivity" target="failedActivity" />
64         <camunda:in source="workStep" target="workStep" />
65         <camunda:in source="errorCode" target="errorCode" />
66         <camunda:in source="errorText" target="errorText" />
67         <camunda:in source="validResponses" target="validResponses" />
68         <camunda:out source="WorkflowException" target="WorkflowException" />
69         <camunda:out source="responseValue" target="handlingCode" />
70         <camunda:in source="vnfName" target="vnfName" />
71         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
72       </bpmn2:extensionElements>
73       <bpmn2:incoming>SequenceFlow_0navei4</bpmn2:incoming>
74       <bpmn2:outgoing>SequenceFlow_1f0bjoy</bpmn2:outgoing>
75     </bpmn2:callActivity>
76     <bpmn2:sequenceFlow id="SequenceFlow_1f0bjoy" sourceRef="Task_1qu3p0x" targetRef="EndEvent_3" />
77   </bpmn2:process>
78   <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
79   <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
80   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
81     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="RainyDayHandler">
82       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
83         <dc:Bounds x="152" y="79" width="36" height="36" />
84         <bpmndi:BPMNLabel>
85           <dc:Bounds x="147" y="120" width="48" height="14" />
86         </bpmndi:BPMNLabel>
87       </bpmndi:BPMNShape>
88       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
89         <di:waypoint xsi:type="dc:Point" x="188" y="97" />
90         <di:waypoint xsi:type="dc:Point" x="301" y="97" />
91         <bpmndi:BPMNLabel>
92           <dc:Bounds x="245" y="82" width="0" height="0" />
93         </bpmndi:BPMNLabel>
94       </bpmndi:BPMNEdge>
95       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
96         <dc:Bounds x="1025" y="79" width="36" height="36" />
97         <bpmndi:BPMNLabel>
98           <dc:Bounds x="1043" y="120" width="0" height="0" />
99         </bpmndi:BPMNLabel>
100       </bpmndi:BPMNShape>
101       <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
102         <dc:Bounds x="142" y="243" width="417" height="161" />
103       </bpmndi:BPMNShape>
104       <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
105         <dc:Bounds x="179" y="310" width="36" height="36" />
106         <bpmndi:BPMNLabel>
107           <dc:Bounds x="197" y="351" width="0" height="0" />
108         </bpmndi:BPMNLabel>
109       </bpmndi:BPMNShape>
110       <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
111         <dc:Bounds x="465" y="310" width="36" height="36" />
112         <bpmndi:BPMNLabel>
113           <dc:Bounds x="483" y="351" width="0" height="0" />
114         </bpmndi:BPMNLabel>
115       </bpmndi:BPMNShape>
116       <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
117         <di:waypoint xsi:type="dc:Point" x="215" y="328" />
118         <di:waypoint xsi:type="dc:Point" x="290" y="328" />
119         <bpmndi:BPMNLabel>
120           <dc:Bounds x="253" y="313" width="0" height="0" />
121         </bpmndi:BPMNLabel>
122       </bpmndi:BPMNEdge>
123       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
124         <dc:Bounds x="301" y="57" width="100" height="80" />
125       </bpmndi:BPMNShape>
126       <bpmndi:BPMNEdge id="SequenceFlow_0yxffj2_di" bpmnElement="SequenceFlow_0yxffj2">
127         <di:waypoint xsi:type="dc:Point" x="401" y="97" />
128         <di:waypoint xsi:type="dc:Point" x="513" y="97" />
129         <bpmndi:BPMNLabel>
130           <dc:Bounds x="457" y="82" width="0" height="0" />
131         </bpmndi:BPMNLabel>
132       </bpmndi:BPMNEdge>
133       <bpmndi:BPMNShape id="ScriptTask_0b5155c_di" bpmnElement="processJavaError">
134         <dc:Bounds x="290" y="288" width="100" height="80" />
135       </bpmndi:BPMNShape>
136       <bpmndi:BPMNEdge id="SequenceFlow_0g4aus9_di" bpmnElement="SequenceFlow_0g4aus9">
137         <di:waypoint xsi:type="dc:Point" x="390" y="328" />
138         <di:waypoint xsi:type="dc:Point" x="465" y="328" />
139         <bpmndi:BPMNLabel>
140           <dc:Bounds x="428" y="313" width="0" height="0" />
141         </bpmndi:BPMNLabel>
142       </bpmndi:BPMNEdge>
143       <bpmndi:BPMNEdge id="SequenceFlow_12vj619_di" bpmnElement="SequenceFlow_12vj619">
144         <di:waypoint xsi:type="dc:Point" x="613" y="97" />
145         <di:waypoint xsi:type="dc:Point" x="881" y="97" />
146         <bpmndi:BPMNLabel>
147           <dc:Bounds x="747" y="82" width="0" height="0" />
148         </bpmndi:BPMNLabel>
149       </bpmndi:BPMNEdge>
150       <bpmndi:BPMNShape id="ScriptTask_17xngtx_di" bpmnElement="QueryPolicyEngine">
151         <dc:Bounds x="513" y="57" width="100" height="80" />
152       </bpmndi:BPMNShape>
153       <bpmndi:BPMNShape id="ExclusiveGateway_0kqwevj_di" bpmnElement="ExclusiveGateway_0kqwevj" isMarkerVisible="true">
154         <dc:Bounds x="881" y="72" width="50" height="50" />
155         <bpmndi:BPMNLabel>
156           <dc:Bounds x="876" y="122" width="59" height="36" />
157         </bpmndi:BPMNLabel>
158       </bpmndi:BPMNShape>
159       <bpmndi:BPMNEdge id="SequenceFlow_0uwsjoh_di" bpmnElement="SequenceFlow_0uwsjoh">
160         <di:waypoint xsi:type="dc:Point" x="931" y="97" />
161         <di:waypoint xsi:type="dc:Point" x="1025" y="97" />
162         <bpmndi:BPMNLabel>
163           <dc:Bounds x="973" y="82" width="12" height="12" />
164         </bpmndi:BPMNLabel>
165       </bpmndi:BPMNEdge>
166       <bpmndi:BPMNEdge id="SequenceFlow_0navei4_di" bpmnElement="SequenceFlow_0navei4">
167         <di:waypoint xsi:type="dc:Point" x="906" y="72" />
168         <di:waypoint xsi:type="dc:Point" x="906" y="51" />
169         <di:waypoint xsi:type="dc:Point" x="906" y="51" />
170         <di:waypoint xsi:type="dc:Point" x="906" y="19" />
171         <bpmndi:BPMNLabel>
172           <dc:Bounds x="912" y="51" width="18" height="12" />
173         </bpmndi:BPMNLabel>
174       </bpmndi:BPMNEdge>
175       <bpmndi:BPMNShape id="CallActivity_0cg4bcv_di" bpmnElement="Task_1qu3p0x">
176         <dc:Bounds x="856" y="-61" width="100" height="80" />
177       </bpmndi:BPMNShape>
178       <bpmndi:BPMNEdge id="SequenceFlow_1f0bjoy_di" bpmnElement="SequenceFlow_1f0bjoy">
179         <di:waypoint xsi:type="dc:Point" x="956" y="-21" />
180         <di:waypoint xsi:type="dc:Point" x="1043" y="-21" />
181         <di:waypoint xsi:type="dc:Point" x="1043" y="79" />
182         <bpmndi:BPMNLabel>
183           <dc:Bounds x="1000" y="-36" width="0" height="0" />
184         </bpmndi:BPMNLabel>
185       </bpmndi:BPMNEdge>
186     </bpmndi:BPMNPlane>
187   </bpmndi:BPMNDiagram>
188 </bpmn2:definitions>