diff options
Diffstat (limited to 'bpmn/so-bpmn-building-blocks/src/main')
19 files changed, 896 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/main/java/org/onap/so/bpmn/infrastructure/bpmn/activity/DeployActivitySpecs.java b/bpmn/so-bpmn-building-blocks/src/main/java/org/onap/so/bpmn/infrastructure/bpmn/activity/DeployActivitySpecs.java new file mode 100644 index 0000000000..db1f7cb6f9 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/java/org/onap/so/bpmn/infrastructure/bpmn/activity/DeployActivitySpecs.java @@ -0,0 +1,103 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.infrastructure.bpmn.activity; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +import javax.ws.rs.core.UriBuilder; + +import org.apache.http.HttpResponse; +import org.apache.http.StatusLine; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.HttpClientBuilder; +import org.springframework.stereotype.Component; + +@Component +public class DeployActivitySpecs { + private static final String ACTIVITY_FILE_LOCATION = "src/main/resources/ActivitySpec/"; + private static final String ACTIVITY_SPEC_URI = "/activityspec-api/v1.0/activity-spec"; + private static final String CONTENT_TYPE_JSON = "application/json"; + + public static void main(String[] args) throws Exception { + + if (args == null || args.length == 0) { + System.out.println("Please specify hostname argument"); + return; + } + + String hostname = args[0]; + + File dir = new File(ACTIVITY_FILE_LOCATION); + if (!dir.isDirectory()) { + System.out.println("ActivitySpec store is not a directory"); + return; + } + + for (File f : dir.listFiles()) { + String activitySpecName = f.getName(); + String errorMessage = deployActivitySpec(hostname, activitySpecName); + if (errorMessage == null) { + System.out.println("Deployed Activity Spec: " + activitySpecName); + } + else { + System.out.println("Error deploying Activity Spec: " + activitySpecName + " : " + errorMessage); + } + } + return; + } + + protected static String deployActivitySpec(String hostname, String activitySpecName) throws Exception { + String payload = new String(Files.readAllBytes(Paths.get(ACTIVITY_FILE_LOCATION + activitySpecName))); + try { + HttpClient client = HttpClientBuilder.create().build(); + + String url = UriBuilder.fromUri(hostname).path(ACTIVITY_SPEC_URI).build().toString(); + HttpPost post = new HttpPost(url); + + StringEntity input = new StringEntity(payload); + input.setContentType(CONTENT_TYPE_JSON); + post.setEntity(input); + + HttpResponse response = client.execute(post); + StatusLine statusLine = response.getStatusLine(); + + if (statusLine != null) { + if (statusLine.getStatusCode() != 200) { + return (statusLine.toString()); + } + else { + return null; + } + } + else { + return("Empty response from the remote endpoint"); + } + + } catch (Exception e) { + return e.getMessage(); + } + + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFHealthCheckActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFHealthCheckActivitySpec.json new file mode 100644 index 0000000000..9f278b20c1 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFHealthCheckActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFHealthCheckActivity", + "description": "Activity to HealthCheck VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFQuiesceTrafficActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFQuiesceTrafficActivitySpec.json new file mode 100644 index 0000000000..c64098dcea --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFQuiesceTrafficActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFQuiesceTrafficActivity", + "description": "Activity to QuiesceTraffic on VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFResumeTrafficActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFResumeTrafficActivitySpec.json new file mode 100644 index 0000000000..6527f2e66d --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFResumeTrafficActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFResumeTrafficActivity", + "description": "Activity to ResumeTraffic on VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFSetInMaintFlagActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFSetInMaintFlagActivitySpec.json new file mode 100644 index 0000000000..8f3211c9a9 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFSetInMaintFlagActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFSetInMaintFlagActivity", + "description": "Activity to Set InMaint Flag in A&AI", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUnsetInMaintFlagActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUnsetInMaintFlagActivitySpec.json new file mode 100644 index 0000000000..1c3f862fec --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUnsetInMaintFlagActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFUnsetInMaintFlagActivity", + "description": "Activity to Unset InMaint Flag in A&AI", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePostCheckActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePostCheckActivitySpec.json new file mode 100644 index 0000000000..722fd6e667 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePostCheckActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFUpgradePostCheckActivity", + "description": "Activity to UpgradePostCheck on VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePreCheckActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePreCheckActivitySpec.json new file mode 100644 index 0000000000..bae912ee3b --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradePreCheckActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFUpgradePreCheckActivity", + "description": "Activity to UpgradePreCheck on VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradeSoftwareActivitySpec.json b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradeSoftwareActivitySpec.json new file mode 100644 index 0000000000..606fa6cd1f --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/ActivitySpec/VNFUpgradeSoftwareActivitySpec.json @@ -0,0 +1,14 @@ +{ + "name": "VNFUpgradeSoftwareActivity", + "description": "Activity to UpgradeSoftware on VNF", + "categoryList": [ + "VNF" + ], + "inputParameters": [], + "outputParameters": [ + { + "name": "WorkflowException", + "type": "WorkflowException" + } + ] +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFHealthCheckActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFHealthCheckActivity.bpmn new file mode 100644 index 0000000000..2e97206867 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFHealthCheckActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFHealthCheckActivity" name="VNFHealthCheckActivity" isExecutable="true"> + <bpmn:startEvent id="VNFHealthCheckActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFHealthCheckActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFHealthCheckActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskHealthCheck" targetRef="VNFHealthCheckActivity_End" /> + <bpmn:serviceTask id="TaskHealthCheck" name="VNF Health Check" camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionHealthCheck"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskHealthCheck" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFHealthCheckActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFHealthCheckActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFHealthCheckActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskHealthCheck"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFQuiesceTrafficActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFQuiesceTrafficActivity.bpmn new file mode 100644 index 0000000000..ac09674884 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFQuiesceTrafficActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFQuiesceTrafficActivity" name="VNFQuiesceTrafficActivity" isExecutable="true"> + <bpmn:startEvent id="VNFQuiesceTrafficActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFQuiesceTrafficActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFQuiesceTrafficActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskQuiesceTraffic" targetRef="VNFQuiesceTrafficActivity_End" /> + <bpmn:serviceTask id="TaskQuiesceTraffic" name="VNF Quiesce Traffic" camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionQuiesceTraffic"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskQuiesceTraffic" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFQuiesceTrafficActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFQuiesceTrafficActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFQuiesceTrafficActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskQuiesceTraffic"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFResumeTrafficActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFResumeTrafficActivity.bpmn new file mode 100644 index 0000000000..c21072a32a --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFResumeTrafficActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFResumeTrafficActivity" name="VNFResumeTrafficActivity" isExecutable="true"> + <bpmn:startEvent id="VNFResumeTrafficActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFResumeTrafficActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFResumeTrafficActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskResumeTraffic" targetRef="VNFResumeTrafficActivity_End" /> + <bpmn:serviceTask id="TaskResumeTraffic" name="VNF Resume Traffic" camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionResumeTraffic"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskResumeTraffic" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFResumeTrafficActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFResumeTrafficActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFResumeTrafficActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskResumeTraffic"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetInMaintFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetInMaintFlagActivity.bpmn new file mode 100644 index 0000000000..2bdb1d7533 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetInMaintFlagActivity.bpmn @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFSetInMaintFlagActivity" name="VNFSetInMaintFlagActivity " isExecutable="true"> + <bpmn:startEvent id="VNFSetInMaintFlagActivity_Start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFSetInMaintFlagActivity_End"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="TaskSetInMaint" name="VNF Set InMaint Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), true)}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="VNFSetInMaintFlagActivity_Start" targetRef="TaskSetInMaint" /> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="TaskSetInMaint" targetRef="VNFSetInMaintFlagActivity_End" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFSetInMaintFlagActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFSetInMaintFlagActivity_Start"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="122" y="112" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFSetInMaintFlagActivity_End"> + <dc:Bounds x="320" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="338" y="116" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskSetInMaint"> + <dc:Bounds x="192" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> + <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="192" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="166" y="73" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> + <di:waypoint xsi:type="dc:Point" x="292" y="94" /> + <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="306" y="79" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetInMaintFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetInMaintFlagActivity.bpmn new file mode 100644 index 0000000000..05d3fcfa27 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetInMaintFlagActivity.bpmn @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFUnsetInMaintFlagActivity" name="VNFUnsetInMaintFlagActivity " isExecutable="true"> + <bpmn:startEvent id="VNFUnsetInMaintFlagActivity_Start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFUnsetInMaintFlagActivity_End"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="TaskUnsetInMaint" name="VNF UnSet InMaint Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), false)}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="VNFUnsetInMaintFlagActivity_Start" targetRef="TaskUnsetInMaint" /> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="TaskUnsetInMaint" targetRef="VNFUnsetInMaintFlagActivity_End" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFUnsetInMaintFlagActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFUnsetInMaintFlagActivity_Start"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="122" y="112" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFUnsetInMaintFlagActivity_End"> + <dc:Bounds x="320" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="338" y="116" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskUnsetInMaint"> + <dc:Bounds x="192" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> + <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="192" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="166" y="73" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> + <di:waypoint xsi:type="dc:Point" x="292" y="94" /> + <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="306" y="79" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePostCheckActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePostCheckActivity.bpmn new file mode 100644 index 0000000000..56c24dabc9 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePostCheckActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFUpgradePostCheckActivity" name="VNFUpgradePostCheckActivity" isExecutable="true"> + <bpmn:startEvent id="VNFUpgradePostCheckActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFUpgradePostCheckActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFUpgradePostCheckActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskUpgradePostCheck" targetRef="VNFUpgradePostCheckActivity_End" /> + <bpmn:serviceTask id="TaskUpgradePostCheck" name="VNF Upgrade PostCheck " camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionUpgradePostCheck"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskUpgradePostCheck" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFUpgradePostCheckActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFUpgradePostCheckActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFUpgradePostCheckActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskUpgradePostCheck"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePreCheckActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePreCheckActivity.bpmn new file mode 100644 index 0000000000..1ec0a18dd5 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradePreCheckActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFUpgradePreCheckActivity" name="VNFUpgradePreCheckActivity" isExecutable="true"> + <bpmn:startEvent id="VNFUpgradePreCheckActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFUpgradePreCheckActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFUpgradePreCheckActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskUpgradePreCheck" targetRef="VNFUpgradePreCheckActivity_End" /> + <bpmn:serviceTask id="TaskUpgradePreCheck" name="VNF Upgrade PreCheck " camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionUpgradePreCheck"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskUpgradePreCheck" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFUpgradePreCheckActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFUpgradePreCheckActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFUpgradePreCheckActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskUpgradePreCheck"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradeSoftwareActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradeSoftwareActivity.bpmn new file mode 100644 index 0000000000..89481a5640 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUpgradeSoftwareActivity.bpmn @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> + <bpmn:process id="VNFUpgradeSoftwareActivity" name="VNFUpgradeSoftwareActivity" isExecutable="true"> + <bpmn:startEvent id="VNFUpgradeSoftwareActivity_Start"> + <bpmn:outgoing>SequenceFlow_06vhbci</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="VNFUpgradeSoftwareActivity_End"> + <bpmn:incoming>SequenceFlow_01312aj</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_06vhbci" sourceRef="VNFUpgradeSoftwareActivity_Start" targetRef="TaskPreProcessActivity" /> + <bpmn:sequenceFlow id="SequenceFlow_01312aj" sourceRef="TaskUpgradeSoftware" targetRef="VNFUpgradeSoftwareActivity_End" /> + <bpmn:serviceTask id="TaskUpgradeSoftware" name="VNF Upgrade Software" camunda:expression="${AppcRunTasks.runAppcCommand(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")),execution.getVariable("actionUpgradeSoftware"))}"> + <bpmn:incoming>SequenceFlow_0cf0riu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01312aj</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0cf0riu" sourceRef="TaskPreProcessActivity" targetRef="TaskUpgradeSoftware" /> + <bpmn:serviceTask id="TaskPreProcessActivity" name="PreProcess Activity" camunda:expression="${AppcRunTasks.preProcessActivity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06vhbci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cf0riu</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFUpgradeSoftwareActivity"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFUpgradeSoftwareActivity_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_102xlzi_di" bpmnElement="VNFUpgradeSoftwareActivity_End"> + <dc:Bounds x="561" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="579" y="138" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06vhbci_di" bpmnElement="SequenceFlow_06vhbci"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="255" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="232" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01312aj_di" bpmnElement="SequenceFlow_01312aj"> + <di:waypoint xsi:type="dc:Point" x="497" y="120" /> + <di:waypoint xsi:type="dc:Point" x="561" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="529" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_066idx4_di" bpmnElement="TaskUpgradeSoftware"> + <dc:Bounds x="397" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cf0riu_di" bpmnElement="SequenceFlow_0cf0riu"> + <di:waypoint xsi:type="dc:Point" x="355" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="376" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fti66x_di" bpmnElement="TaskPreProcessActivity"> + <dc:Bounds x="255" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn index 8765bca20c..eaee5399e6 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -33,7 +33,7 @@ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="ExclusiveGateway_1blf52g" /> - <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingV2"> + <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingBB"> <bpmn:extensionElements> <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> <camunda:in source="mso-request-id" target="mso-request-id" /> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn new file mode 100644 index 0000000000..67ee5d0f74 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn @@ -0,0 +1,208 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="Homing" name="Homing" isExecutable="true"> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_1x9usa6</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:scriptTask id="callSniro" name=" Call Sniro/Oof " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1x9usa6</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0lc15i7</bpmn2:outgoing> + <bpmn2:script>import org.onap.so.bpmn.common.scripts.* +if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")).getVariable("homingService") == "oof"){ + OofHoming oofHoming = new OofHoming() + oofHoming.callOof(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) +}else{ + SniroHomingV2 sniroHoming = new SniroHomingV2() + SniroHoming.callSniro(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) +}</bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1x9usa6" sourceRef="StartEvent_1" targetRef="callSniro" /> + <bpmn2:subProcess id="bpmnErrorSubprocess" name="Error Handling Subprocess" triggeredByEvent="true"> + <bpmn2:endEvent id="EndEvent_07tjq3v"> + <bpmn2:incoming>SequenceFlow_1rf4vs8</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:startEvent id="StartEvent_1qiitb2"> + <bpmn2:outgoing>SequenceFlow_00nlh7l</bpmn2:outgoing> + <bpmn2:errorEventDefinition /> + </bpmn2:startEvent> + <bpmn2:scriptTask id="processMsoWorkflowException" name="Process Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_00nlh7l</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1rf4vs8</bpmn2:outgoing> + <bpmn2:script>import org.onap.so.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processSubflowsBPMNException(execution)</bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1rf4vs8" sourceRef="processMsoWorkflowException" targetRef="EndEvent_07tjq3v" /> + <bpmn2:sequenceFlow id="SequenceFlow_00nlh7l" sourceRef="StartEvent_1qiitb2" targetRef="processMsoWorkflowException" /> + </bpmn2:subProcess> + <bpmn2:subProcess id="javaExceptionSubProcess" name="Java Exception Sub Process" triggeredByEvent="true"> + <bpmn2:scriptTask id="processJavaException" name="Process Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0kamg53</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1o7154s</bpmn2:outgoing> + <bpmn2:script>import org.onap.so.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)</bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:startEvent id="StartEvent_1fbpeuw"> + <bpmn2:outgoing>SequenceFlow_0kamg53</bpmn2:outgoing> + <bpmn2:errorEventDefinition errorRef="Error_1lwpypa" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_0jbvnr0"> + <bpmn2:incoming>SequenceFlow_1o7154s</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0kamg53" name="" sourceRef="StartEvent_1fbpeuw" targetRef="processJavaException" /> + <bpmn2:sequenceFlow id="SequenceFlow_1o7154s" name="" sourceRef="processJavaException" targetRef="EndEvent_0jbvnr0" /> + </bpmn2:subProcess> + <bpmn2:scriptTask id="processSniroHomingSolution" name=" Process Solution " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1fipbmk</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_01apjvo</bpmn2:outgoing> + <bpmn2:script>import org.onap.so.bpmn.common.scripts.* +if(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")).getVariable("homingService") == "oof"){ + OofHoming oofHoming = new OofHoming() + oofHoming.processHomingSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution"))) +}else{ + SniroHomingV2 sniroHoming = new SniroHomingV2 () + sniroHoming.processSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), asyncResponse) +}</bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" camunda:modelerTemplate="receiveWorkflowMessage" calledElement="ReceiveWorkflowMessage"> + <bpmn2:extensionElements> + <camunda:in source="true" target="isDebugLogEnabled" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="asyncMessageType" target="RCVWFMSG_messageType" /> + <camunda:in source="asyncCorrelator" target="RCVWFMSG_correlator" /> + <camunda:in source="asyncTimeout" target="RCVWFMSG_timeout" /> + <camunda:out source="WorkflowResponse" target="asyncCallbackResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0lc15i7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1fipbmk</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1fipbmk" sourceRef="receiveAsyncCallback" targetRef="processSniroHomingSolution" /> + <bpmn2:sequenceFlow id="SequenceFlow_01apjvo" sourceRef="processSniroHomingSolution" targetRef="EndEvent_0rrbz2a" /> + <bpmn2:endEvent id="EndEvent_0rrbz2a"> + <bpmn2:incoming>SequenceFlow_01apjvo</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0lc15i7" sourceRef="callSniro" targetRef="receiveAsyncCallback" /> + </bpmn2:process> + <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Homing"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> + <dc:Bounds x="147" y="275" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0qmfpdr_di" bpmnElement="callSniro"> + <dc:Bounds x="313" y="253" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1x9usa6_di" bpmnElement="SequenceFlow_1x9usa6"> + <di:waypoint x="183" y="293" /> + <di:waypoint x="313" y="293" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="203" y="278" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_16p12qo_di" bpmnElement="bpmnErrorSubprocess" isExpanded="true"> + <dc:Bounds x="254" y="449" width="409" height="168" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_12gjiy8_di" bpmnElement="javaExceptionSubProcess" isExpanded="true"> + <dc:Bounds x="284" y="632" width="350" height="159" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_07tjq3v_di" bpmnElement="EndEvent_07tjq3v"> + <dc:Bounds x="579" y="523" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="552" y="564" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1qiitb2_di" bpmnElement="StartEvent_1qiitb2"> + <dc:Bounds x="299" y="523" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="272" y="564" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_03hs6s9_di" bpmnElement="processMsoWorkflowException"> + <dc:Bounds x="406" y="501" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_19gqykh_di" bpmnElement="processJavaException"> + <dc:Bounds x="410" y="680" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1fbpeuw_di" bpmnElement="StartEvent_1fbpeuw"> + <dc:Bounds x="318" y="702" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="291" y="743" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0jbvnr0_di" bpmnElement="EndEvent_0jbvnr0"> + <dc:Bounds x="567" y="702" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="540" y="743" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1rf4vs8_di" bpmnElement="SequenceFlow_1rf4vs8"> + <di:waypoint x="506" y="541" /> + <di:waypoint x="579" y="541" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="498" y="526" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00nlh7l_di" bpmnElement="SequenceFlow_00nlh7l"> + <di:waypoint x="335" y="541" /> + <di:waypoint x="363" y="541" /> + <di:waypoint x="363" y="541" /> + <di:waypoint x="406" y="541" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="333" y="541" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0kamg53_di" bpmnElement="SequenceFlow_0kamg53"> + <di:waypoint x="354" y="720" /> + <di:waypoint x="410" y="720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="337" y="705" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1o7154s_di" bpmnElement="SequenceFlow_1o7154s"> + <di:waypoint x="510" y="720" /> + <di:waypoint x="567" y="720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="494" y="705" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1aapkvq_di" bpmnElement="processSniroHomingSolution"> + <dc:Bounds x="597" y="253" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_031b5m3_di" bpmnElement="receiveAsyncCallback"> + <dc:Bounds x="455" y="253" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1fipbmk_di" bpmnElement="SequenceFlow_1fipbmk"> + <di:waypoint x="555" y="293" /> + <di:waypoint x="597" y="293" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="531" y="272" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01apjvo_di" bpmnElement="SequenceFlow_01apjvo"> + <di:waypoint x="697" y="293" /> + <di:waypoint x="860" y="293" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="778.5" y="272" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_07i1a5x_di" bpmnElement="EndEvent_0rrbz2a"> + <dc:Bounds x="860" y="275" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="877.17" y="315" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0lc15i7_di" bpmnElement="SequenceFlow_0lc15i7"> + <di:waypoint x="413" y="293" /> + <di:waypoint x="455" y="293" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="434" y="272" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> |