2638d85a8ab9cbd99db3d121592c2738c19915fd
[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="RFH_validResponses" target="validResponses" />
68         <camunda:out source="WorkflowException" target="WorkflowException" />
69         <camunda:out source="responseValue" target="handlingCode" />
70       </bpmn2:extensionElements>
71       <bpmn2:incoming>SequenceFlow_0navei4</bpmn2:incoming>
72       <bpmn2:outgoing>SequenceFlow_1f0bjoy</bpmn2:outgoing>
73     </bpmn2:callActivity>
74     <bpmn2:sequenceFlow id="SequenceFlow_1f0bjoy" sourceRef="Task_1qu3p0x" targetRef="EndEvent_3" />
75   </bpmn2:process>
76   <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
77   <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
78   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
79     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="RainyDayHandler">
80       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
81         <dc:Bounds x="152" y="79" width="36" height="36" />
82         <bpmndi:BPMNLabel>
83           <dc:Bounds x="147" y="120" width="48" height="14" />
84         </bpmndi:BPMNLabel>
85       </bpmndi:BPMNShape>
86       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
87         <di:waypoint xsi:type="dc:Point" x="188" y="97" />
88         <di:waypoint xsi:type="dc:Point" x="301" y="97" />
89         <bpmndi:BPMNLabel>
90           <dc:Bounds x="245" y="82" width="0" height="0" />
91         </bpmndi:BPMNLabel>
92       </bpmndi:BPMNEdge>
93       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
94         <dc:Bounds x="1025" y="79" width="36" height="36" />
95         <bpmndi:BPMNLabel>
96           <dc:Bounds x="1043" y="120" width="0" height="0" />
97         </bpmndi:BPMNLabel>
98       </bpmndi:BPMNShape>
99       <bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
100         <dc:Bounds x="142" y="243" width="417" height="161" />
101       </bpmndi:BPMNShape>
102       <bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
103         <dc:Bounds x="179" y="310" width="36" height="36" />
104         <bpmndi:BPMNLabel>
105           <dc:Bounds x="197" y="351" width="0" height="0" />
106         </bpmndi:BPMNLabel>
107       </bpmndi:BPMNShape>
108       <bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
109         <dc:Bounds x="465" y="310" width="36" height="36" />
110         <bpmndi:BPMNLabel>
111           <dc:Bounds x="483" y="351" width="0" height="0" />
112         </bpmndi:BPMNLabel>
113       </bpmndi:BPMNShape>
114       <bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
115         <di:waypoint xsi:type="dc:Point" x="215" y="328" />
116         <di:waypoint xsi:type="dc:Point" x="290" y="328" />
117         <bpmndi:BPMNLabel>
118           <dc:Bounds x="253" y="313" width="0" height="0" />
119         </bpmndi:BPMNLabel>
120       </bpmndi:BPMNEdge>
121       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
122         <dc:Bounds x="301" y="57" width="100" height="80" />
123       </bpmndi:BPMNShape>
124       <bpmndi:BPMNEdge id="SequenceFlow_0yxffj2_di" bpmnElement="SequenceFlow_0yxffj2">
125         <di:waypoint xsi:type="dc:Point" x="401" y="97" />
126         <di:waypoint xsi:type="dc:Point" x="513" y="97" />
127         <bpmndi:BPMNLabel>
128           <dc:Bounds x="457" y="82" width="0" height="0" />
129         </bpmndi:BPMNLabel>
130       </bpmndi:BPMNEdge>
131       <bpmndi:BPMNShape id="ScriptTask_0b5155c_di" bpmnElement="processJavaError">
132         <dc:Bounds x="290" y="288" width="100" height="80" />
133       </bpmndi:BPMNShape>
134       <bpmndi:BPMNEdge id="SequenceFlow_0g4aus9_di" bpmnElement="SequenceFlow_0g4aus9">
135         <di:waypoint xsi:type="dc:Point" x="390" y="328" />
136         <di:waypoint xsi:type="dc:Point" x="465" y="328" />
137         <bpmndi:BPMNLabel>
138           <dc:Bounds x="428" y="313" width="0" height="0" />
139         </bpmndi:BPMNLabel>
140       </bpmndi:BPMNEdge>
141       <bpmndi:BPMNEdge id="SequenceFlow_12vj619_di" bpmnElement="SequenceFlow_12vj619">
142         <di:waypoint xsi:type="dc:Point" x="613" y="97" />
143         <di:waypoint xsi:type="dc:Point" x="881" y="97" />
144         <bpmndi:BPMNLabel>
145           <dc:Bounds x="747" y="82" width="0" height="0" />
146         </bpmndi:BPMNLabel>
147       </bpmndi:BPMNEdge>
148       <bpmndi:BPMNShape id="ScriptTask_17xngtx_di" bpmnElement="QueryPolicyEngine">
149         <dc:Bounds x="513" y="57" width="100" height="80" />
150       </bpmndi:BPMNShape>
151       <bpmndi:BPMNShape id="ExclusiveGateway_0kqwevj_di" bpmnElement="ExclusiveGateway_0kqwevj" isMarkerVisible="true">
152         <dc:Bounds x="881" y="72" width="50" height="50" />
153         <bpmndi:BPMNLabel>
154           <dc:Bounds x="876" y="122" width="59" height="36" />
155         </bpmndi:BPMNLabel>
156       </bpmndi:BPMNShape>
157       <bpmndi:BPMNEdge id="SequenceFlow_0uwsjoh_di" bpmnElement="SequenceFlow_0uwsjoh">
158         <di:waypoint xsi:type="dc:Point" x="931" y="97" />
159         <di:waypoint xsi:type="dc:Point" x="1025" y="97" />
160         <bpmndi:BPMNLabel>
161           <dc:Bounds x="973" y="82" width="12" height="12" />
162         </bpmndi:BPMNLabel>
163       </bpmndi:BPMNEdge>
164       <bpmndi:BPMNEdge id="SequenceFlow_0navei4_di" bpmnElement="SequenceFlow_0navei4">
165         <di:waypoint xsi:type="dc:Point" x="906" y="72" />
166         <di:waypoint xsi:type="dc:Point" x="906" y="51" />
167         <di:waypoint xsi:type="dc:Point" x="906" y="51" />
168         <di:waypoint xsi:type="dc:Point" x="906" y="19" />
169         <bpmndi:BPMNLabel>
170           <dc:Bounds x="912" y="51" width="18" height="12" />
171         </bpmndi:BPMNLabel>
172       </bpmndi:BPMNEdge>
173       <bpmndi:BPMNShape id="CallActivity_0cg4bcv_di" bpmnElement="Task_1qu3p0x">
174         <dc:Bounds x="856" y="-61" width="100" height="80" />
175       </bpmndi:BPMNShape>
176       <bpmndi:BPMNEdge id="SequenceFlow_1f0bjoy_di" bpmnElement="SequenceFlow_1f0bjoy">
177         <di:waypoint xsi:type="dc:Point" x="956" y="-21" />
178         <di:waypoint xsi:type="dc:Point" x="1043" y="-21" />
179         <di:waypoint xsi:type="dc:Point" x="1043" y="79" />
180         <bpmndi:BPMNLabel>
181           <dc:Bounds x="1000" y="-36" width="0" height="0" />
182         </bpmndi:BPMNLabel>
183       </bpmndi:BPMNEdge>
184     </bpmndi:BPMNPlane>
185   </bpmndi:BPMNDiagram>
186 </bpmn2:definitions>