diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-07-30 15:56:09 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-07-31 11:09:25 -0400 |
commit | 5a6a6de6f1a26a1897e4917a0df613e25a24eb70 (patch) | |
tree | 59a968f27b4b603aacc9d5e7b51fb598aeec5321 /bpmn/so-bpmn-building-blocks | |
parent | b6dc38501f3b746426b42d9de4cc883d894149e8 (diff) |
Containerization feature of SO
Change-Id: I95381232eeefcd247a66a5cec370a8ce1c288e18
Issue-ID: SO-670
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-building-blocks')
104 files changed, 9541 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml new file mode 100644 index 0000000000..cc6e19d446 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/pom.xml @@ -0,0 +1,224 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.3.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>so-bpmn-building-blocks</artifactId> + <packaging>jar</packaging> + <properties> + <jax.ws.rs>2.0.1</jax.ws.rs> + <httpclient.version>3.1</httpclient.version> + <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> + <h2.version>1.4.196</h2.version> + <groovy.version>2.4.7</groovy.version> + <saxon.version>9.5.1-8</saxon.version> + <xmlunit.version>1.6</xmlunit.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <camunda-os.version>7.8.0</camunda-os.version> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-codegen-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTasksTestsTestSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>bpmn-tests</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllBPMNTestSuites.java</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings + only. It has no influence on the Maven build itself. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> + org.apache.maven.plugins + </groupId> + <artifactId> + maven-antrun-plugin + </artifactId> + <versionRange> + [1.3,) + </versionRange> + <goals> + <goal>run</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-bom</artifactId> + <version>${camunda-os.version}</version> + <scope>import</scope> + <type>pom</type> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine</artifactId> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>2.3.0-alpha2</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jdbc</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-actuator</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.fasterxml.uuid</groupId> + <artifactId>java-uuid-generator</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.4</version> + </dependency> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-spring</artifactId> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + </exclusions> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-tasks</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>commons-net</groupId> + <artifactId>commons-net</artifactId> + <version>3.6</version> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml new file mode 100644 index 0000000000..33c8cb1ac0 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ============LICENSE_START======================================================= + ONAP SO + ================================================================================ + 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========================================================= + --> + +<process-application + xmlns="http://www.camunda.org/schema/1.0/ProcessApplication" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <process-archive name="MSOCommonBPMN"> + <properties> + <property name="isDeleteUponUndeploy">false</property> + <property name="isScanForProcessDefinitions">true</property> + </properties> + </process-archive> + +</process-application> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.RestProperties b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.RestProperties new file mode 100644 index 0000000000..bdc72c86a4 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.RestProperties @@ -0,0 +1,2 @@ +org.onap.so.client.restproperties.AAIPropertiesImpl +org.onap.so.client.restproperties.PolicyRestPropertiesImpl
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.dmaap.DmaapProperties b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.dmaap.DmaapProperties new file mode 100644 index 0000000000..939d5cdc1b --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/services/org.onap.so.client.dmaap.DmaapProperties @@ -0,0 +1,2 @@ +org.onap.so.client.dmaapproperties.GlobalDmaapPropertiesImpl +org.onap.so.client.dmaapproperties.DefaultDmaapPropertiesImpl
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn new file mode 100644 index 0000000000..de0f450624 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.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="AAICheckVnfInMaintBB" name="AAICheckVnfInMaintBB" isExecutable="true"> + <bpmn:startEvent id="Start_AAICheckVnfInMaintBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_AAICheckVnfInMaintBB" name="end"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_CheckVnfInMaint" name="Check If Vnf In Maint (AAI)" camunda:expression="${AAIFlagTasks.checkVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AAICheckVnfInMaintBB" targetRef="Task_CheckVnfInMaint" /> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_CheckVnfInMaint" targetRef="End_AAICheckVnfInMaintBB" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAICheckVnfInMaintBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAICheckVnfInMaintBB"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="111" y="112" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAICheckVnfInMaintBB"> + <dc:Bounds x="353" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="362" y="116" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_CheckVnfInMaint"> + <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="353" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="323" y="79" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn new file mode 100644 index 0000000000..b2e100061d --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.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="AAISetVnfInMaintBB" name="AAISetVnfInMaintBB" isExecutable="true"> + <bpmn:startEvent id="Start_AAISetVnfInMaintBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_AAISetVnfInMaintBB" name="end"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_SetInMaint" 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="Start_AAISetVnfInMaintBB" targetRef="Task_SetInMaint" /> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_SetInMaint" targetRef="End_AAISetVnfInMaintBB" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAISetVnfInMaintBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAISetVnfInMaintBB"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="111" y="112" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAISetVnfInMaintBB"> + <dc:Bounds x="320" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="329" y="116" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_SetInMaint"> + <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>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn new file mode 100644 index 0000000000..7335f8677c --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.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="AAIUnsetVnfInMaintBB" name="AAIUnsetVnfInMaintBB" isExecutable="true"> + <bpmn:startEvent id="Start_AAIUnsetVnfInMaintBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_AAIUnsetVnfInMaintBB" name="end"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AAIUnsetVnfInMaintBB" targetRef="Task_UnsetInMaint" /> + <bpmn:serviceTask id="Task_UnsetInMaint" 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_1jwsja5" sourceRef="Task_UnsetInMaint" targetRef="End_AAIUnsetVnfInMaintBB" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAIUnsetVnfInMaintBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAIUnsetVnfInMaintBB"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="111" y="112" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAIUnsetVnfInMaintBB"> + <dc:Bounds x="320" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="329" y="116" width="18" height="12" /> + </bpmndi:BPMNLabel> + </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="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_UnsetInMaint"> + <dc:Bounds x="192" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <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>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn new file mode 100644 index 0000000000..6ca3745f43 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn @@ -0,0 +1,71 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="ActivateNetworkBB" name="ActivateNetworkBB" isExecutable="true"> + <bpmn2:startEvent id="activateNetwork_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="activateNetwork_EndEvent" name="End Flow"> + <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:serviceTask id="Activate_Network_SDNC_ServiceTask" name="Activate Network (SDNC)" camunda:expression="${SDNCActivateTasks.activateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="Activate_Network_AAI_ServiceTask" name="Activate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_05elmhj" sourceRef="activateNetwork_startEvent" targetRef="Activate_Network_SDNC_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0xbvwsu" sourceRef="Activate_Network_SDNC_ServiceTask" targetRef="Activate_Network_AAI_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_18atf08" sourceRef="Activate_Network_AAI_ServiceTask" targetRef="activateNetwork_EndEvent" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateNetworkBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetwork_startEvent"> + <dc:Bounds x="545" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="538" y="-14" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetwork_EndEvent"> + <dc:Bounds x="975" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="971" y="-19" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="Activate_Network_SDNC_ServiceTask"> + <dc:Bounds x="653" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="Activate_Network_AAI_ServiceTask"> + <dc:Bounds x="802" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> + <di:waypoint xsi:type="dc:Point" x="581" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="653" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="617" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0xbvwsu_di" bpmnElement="SequenceFlow_0xbvwsu"> + <di:waypoint xsi:type="dc:Point" x="753" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="802" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="793" y="-37" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> + <di:waypoint xsi:type="dc:Point" x="902" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="975" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="954" y="-37" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn new file mode 100644 index 0000000000..87a1dae090 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn @@ -0,0 +1,52 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="ActivateNetworkCollectionBB" name="ActivateNetworkCollectionBB" isExecutable="true"> + <bpmn2:startEvent id="activateNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="activateNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:serviceTask id="Activate_Network_Collection_AAI_ServiceTask" name="Activate Network Collection (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_05elmhj" sourceRef="activateNetworkCollection_startEvent" targetRef="Activate_Network_Collection_AAI_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_18atf08" sourceRef="Activate_Network_Collection_AAI_ServiceTask" targetRef="activateNetworkCollection_EndEvent" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateNetworkCollectionBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetworkCollection_startEvent"> + <dc:Bounds x="590" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="583" y="-14" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetworkCollection_EndEvent"> + <dc:Bounds x="894" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="890" y="-19" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="Activate_Network_Collection_AAI_ServiceTask"> + <dc:Bounds x="715" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> + <di:waypoint xsi:type="dc:Point" x="626" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="715" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="671" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> + <di:waypoint xsi:type="dc:Point" x="815" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="894" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="855" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn new file mode 100644 index 0000000000..3d55ecd8f6 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn @@ -0,0 +1,65 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="ActivateServiceInstanceBB" name="ActivateServiceInstanceBB" isExecutable="true"> + <bpmn:startEvent id="Start_ActivateServiceInstanceBB" name="start"> + <bpmn:outgoing>SequenceFlow_1byfr8v</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_ActivateServiceInstanceBB" name="end"> + <bpmn:incoming>SequenceFlow_0pioehv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_NoOpServiceInstance" targetRef="Task_UpdateServiceOrchestrationStatusToActive" /> + <bpmn:task id="Task_NoOpServiceInstance" name="No-Op Service Instance (SDNC and SDNW)"> + <bpmn:incoming>SequenceFlow_1byfr8v</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> + </bpmn:task> + <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_UpdateServiceOrchestrationStatusToActive" targetRef="End_ActivateServiceInstanceBB" /> + <bpmn:serviceTask id="Task_UpdateServiceOrchestrationStatusToActive" name="Update Service Orchestration Status to Active (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1byfr8v" sourceRef="Start_ActivateServiceInstanceBB" targetRef="Task_NoOpServiceInstance" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateServiceInstanceBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateServiceInstanceBB"> + <dc:Bounds x="174" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="181" y="138" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1qdtskz_di" bpmnElement="End_ActivateServiceInstanceBB"> + <dc:Bounds x="591" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="600" y="142" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_00q7fsg_di" bpmnElement="SequenceFlow_00q7fsg"> + <di:waypoint xsi:type="dc:Point" x="382" y="120" /> + <di:waypoint xsi:type="dc:Point" x="449" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="370.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="Task_19a98rp_di" bpmnElement="Task_NoOpServiceInstance"> + <dc:Bounds x="282" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0pioehv_di" bpmnElement="SequenceFlow_0pioehv"> + <di:waypoint xsi:type="dc:Point" x="549" y="120" /> + <di:waypoint xsi:type="dc:Point" x="591" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="525" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1d9vh4e_di" bpmnElement="Task_UpdateServiceOrchestrationStatusToActive"> + <dc:Bounds x="449" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1byfr8v_di" bpmnElement="SequenceFlow_1byfr8v"> + <di:waypoint xsi:type="dc:Point" x="210" y="120" /> + <di:waypoint xsi:type="dc:Point" x="282" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="246" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn new file mode 100644 index 0000000000..b118d9b71c --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn @@ -0,0 +1,66 @@ +<?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.8.2"> + <bpmn:process id="ActivateVfModuleBB" name="ActivateVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="ActivateVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ActivateVfModuleBB_Start" targetRef="ActivateVfModule" /> + <bpmn:endEvent id="ActivateVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="ActivateVfModule" name="SDNC Adapter VFModule Activate" camunda:expression="${SDNCActivateTasks.activateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ActivateVfModule" targetRef="UpdateVfModuleActiveStatus" /> + <bpmn:serviceTask id="UpdateVfModuleActiveStatus" name="Activate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0xsp0pv" sourceRef="UpdateVfModuleActiveStatus" targetRef="ActivateVfModuleBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0q258vt" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateVfModuleBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="ActivateVfModuleBB_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="189.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ActivateVfModuleBB_End"> + <dc:Bounds x="636" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="142" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ActivateVfModule"> + <dc:Bounds x="260" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> + <di:waypoint xsi:type="dc:Point" x="360" y="120" /> + <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="368" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleActiveStatus"> + <dc:Bounds x="466" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> + <di:waypoint xsi:type="dc:Point" x="566" y="120" /> + <di:waypoint xsi:type="dc:Point" x="636" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="601" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn new file mode 100644 index 0000000000..61d8f6eb44 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn @@ -0,0 +1,65 @@ +<?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.8.2"> + <bpmn:process id="ActivateVnfBB" name="ActivateVnfBB" isExecutable="true"> + <bpmn:startEvent id="Start_ActivateVnfBB" name="start"> + <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0k9qnoi" sourceRef="Start_ActivateVnfBB" targetRef="Task_SDNCAdapterVnfTopologyActivate" /> + <bpmn:sequenceFlow id="SequenceFlow_0r6pzwt" sourceRef="Task_SDNCAdapterVnfTopologyActivate" targetRef="Task_ActivateOrchestrationStatusVnf" /> + <bpmn:endEvent id="End_ActivateVnfBB" name="end"> + <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_ActivateOrchestrationStatusVnf" targetRef="End_ActivateVnfBB" /> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyActivate" name="Call SDNC Adapter VNF Topology Activate" camunda:expression="${SDNCActivateTasks.activateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_ActivateOrchestrationStatusVnf" name="Activate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateVnfBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateVnfBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="180" y="138" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0k9qnoi_di" bpmnElement="SequenceFlow_0k9qnoi"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="263" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="236" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0r6pzwt_di" bpmnElement="SequenceFlow_0r6pzwt"> + <di:waypoint xsi:type="dc:Point" x="363" y="120" /> + <di:waypoint xsi:type="dc:Point" x="422" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="392.5" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1ad7eym_di" bpmnElement="End_ActivateVnfBB"> + <dc:Bounds x="572" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="581" y="142" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0vnitwg_di" bpmnElement="SequenceFlow_0vnitwg"> + <di:waypoint xsi:type="dc:Point" x="522" y="120" /> + <di:waypoint xsi:type="dc:Point" x="572" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="547" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1k98q3r_di" bpmnElement="Task_SDNCAdapterVnfTopologyActivate"> + <dc:Bounds x="263" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1vg25fs_di" bpmnElement="Task_ActivateOrchestrationStatusVnf"> + <dc:Bounds x="422" 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/ActivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn new file mode 100644 index 0000000000..03ba8bbe43 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn @@ -0,0 +1,52 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="ActivateVolumeGroupBB" name="ActivateVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="ActivateVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="ActivateVolumeGroupBB_Start" targetRef="ActivateVolumeGroup" /> + <bpmn:endEvent id="ActivateVolumeGroupBB_End"> + <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="ActivateVolumeGroup" name="ActivateVolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="ActivateVolumeGroup" targetRef="ActivateVolumeGroupBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateVolumeGroupBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="ActivateVolumeGroupBB_Start"> + <dc:Bounds x="310" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="346" y="120" /> + <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="360" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="ActivateVolumeGroupBB_End"> + <dc:Bounds x="662" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="635" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="ActivateVolumeGroup"> + <dc:Bounds x="464" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> + <di:waypoint xsi:type="dc:Point" x="564" y="120" /> + <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="613" y="98" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn new file mode 100644 index 0000000000..cb4be0279e --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn @@ -0,0 +1,92 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="AssignNetwork1802BB" name="AssignNetwork1802BB" isExecutable="true"> + <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> + <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> + <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> + <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> + <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="ServiceTask_get_cloud_region" /> + <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> +</bpmn2:textAnnotation> + <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetwork1802BB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> + <dc:Bounds x="1167" y="246" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1160" y="287" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> + <dc:Bounds x="1298" y="224" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> + <dc:Bounds x="1449" y="229" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> + <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1422" y="249" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> + <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> + <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1514" y="343.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> + <dc:Bounds x="1393" y="153" width="212" height="30" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> + <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> + <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> + <dc:Bounds x="1449" y="378" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> + <dc:Bounds x="1481" y="512" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1476" y="552" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> + <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> + <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1514" y="475" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> + <di:waypoint xsi:type="dc:Point" x="1203" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1205.5" y="249" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn new file mode 100644 index 0000000000..79cbe68a3a --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="AssignNetworkBB" name="AssignNetworkBB" isExecutable="true"> + <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0mxc4ri</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_017131q</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> + <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> + <bpmn2:serviceTask id="ServiceTask_put_network_in_AAI" name="Put network shell in AAI " camunda:expression="${AAICreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0gkr871</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1ctpnpe</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:exclusiveGateway id="networkFoundByName_ExclusiveGateway" name="skip if network found by name or to be created by SDNC" default="SequenceFlow_0gkr871"> + <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_017131q</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0gkr871</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_017131q" name="Yes" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_get_cloud_region"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{AssignNetwork.skipNetworkCreationInAAI(execution.getVariable("gBuildingBlockExecution")) == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0gkr871" name="No" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_put_network_in_AAI" /> + <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> + <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> + <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="networkFoundByName_ExclusiveGateway" /> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCIG" name="Connect L3Network to NetworkCollectionInstanceGroup " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_07z7hcu</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0e08b9t</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCSI" name="Connect L3Network to ServiceInstance " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0e08b9t</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0mxc4ri</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_1ctpnpe" sourceRef="ServiceTask_put_network_in_AAI" targetRef="ServiceTask_connect_to_Tenant" /> + <bpmn2:sequenceFlow id="SequenceFlow_0e08b9t" sourceRef="ServiceTask_connect_to_NCIG" targetRef="ServiceTask_connect_to_NCSI" /> + <bpmn2:sequenceFlow id="SequenceFlow_0mxc4ri" sourceRef="ServiceTask_connect_to_NCSI" targetRef="ServiceTask_get_cloud_region" /> + <bpmn2:serviceTask id="ServiceTask_connect_to_Tenant" name="Connect L3Network to Tenant " camunda:expression="${AAICreateTasks.connectNetworkToTenant(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1ctpnpe</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0fwcvep</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_connect_to_CloudRegion" name="Connect L3Network to Cloud Region " camunda:expression="${AAICreateTasks.connectNetworkToCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0fwcvep</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_07z7hcu</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_0fwcvep" sourceRef="ServiceTask_connect_to_Tenant" targetRef="ServiceTask_connect_to_CloudRegion" /> + <bpmn2:sequenceFlow id="SequenceFlow_07z7hcu" sourceRef="ServiceTask_connect_to_CloudRegion" targetRef="ServiceTask_connect_to_NCIG" /> + <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> +</bpmn2:textAnnotation> + <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> + <bpmn2:textAnnotation id="TextAnnotation_17jb2vn"> <bpmn2:text>conditionally executed if Network Collection Instance Group exists</bpmn2:text> +</bpmn2:textAnnotation> + <bpmn2:association id="Association_15ppe1t" sourceRef="ServiceTask_connect_to_NCIG" targetRef="TextAnnotation_17jb2vn" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetworkBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> + <dc:Bounds x="764" y="-105" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="757" y="-64" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> + <dc:Bounds x="1298" y="224" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> + <dc:Bounds x="1449" y="229" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> + <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1422" y="249" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> + <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> + <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1514" y="343.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> + <dc:Bounds x="1393" y="153" width="212" height="30" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> + <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> + <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1dm3ngd_di" bpmnElement="ServiceTask_put_network_in_AAI"> + <dc:Bounds x="813" y="-22" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> + <dc:Bounds x="1449" y="378" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_19hvq7h_di" bpmnElement="networkFoundByName_ExclusiveGateway" isMarkerVisible="true"> + <dc:Bounds x="838" y="-112" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="821" y="-176" width="83" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_017131q_di" bpmnElement="SequenceFlow_017131q"> + <di:waypoint xsi:type="dc:Point" x="888" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1348" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1348" y="224" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="904" y="-113" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0gkr871_di" bpmnElement="SequenceFlow_0gkr871"> + <di:waypoint xsi:type="dc:Point" x="863" y="-62" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-22" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="887" y="-53" width="14" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> + <dc:Bounds x="1481" y="512" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1476" y="552" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> + <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> + <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1514" y="475" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> + <di:waypoint xsi:type="dc:Point" x="800" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="838" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="819" y="-102" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0a96yhg_di" bpmnElement="ServiceTask_connect_to_NCIG"> + <dc:Bounds x="970" y="224" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0mauyto_di" bpmnElement="ServiceTask_connect_to_NCSI"> + <dc:Bounds x="1130" y="224" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ctpnpe_di" bpmnElement="SequenceFlow_1ctpnpe"> + <di:waypoint xsi:type="dc:Point" x="863" y="58" /> + <di:waypoint xsi:type="dc:Point" x="863" y="99" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="878" y="79" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0e08b9t_di" bpmnElement="SequenceFlow_0e08b9t"> + <di:waypoint xsi:type="dc:Point" x="1070" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1130" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1100" y="249" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0mxc4ri_di" bpmnElement="SequenceFlow_0mxc4ri"> + <di:waypoint xsi:type="dc:Point" x="1230" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1264" y="239" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_019bzpc_di" bpmnElement="ServiceTask_connect_to_Tenant"> + <dc:Bounds x="813" y="99" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1alvmym_di" bpmnElement="ServiceTask_connect_to_CloudRegion"> + <dc:Bounds x="813" y="224" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0fwcvep_di" bpmnElement="SequenceFlow_0fwcvep"> + <di:waypoint xsi:type="dc:Point" x="863" y="179" /> + <di:waypoint xsi:type="dc:Point" x="863" y="224" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="878" y="191.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_07z7hcu_di" bpmnElement="SequenceFlow_07z7hcu"> + <di:waypoint xsi:type="dc:Point" x="913" y="264" /> + <di:waypoint xsi:type="dc:Point" x="970" y="264" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="942" y="239" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="TextAnnotation_17jb2vn_di" bpmnElement="TextAnnotation_17jb2vn"> + <dc:Bounds x="941" y="344" width="158" height="54" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="Association_15ppe1t_di" bpmnElement="Association_15ppe1t"> + <di:waypoint xsi:type="dc:Point" x="996" y="304" /> + <di:waypoint xsi:type="dc:Point" x="973" y="344" /> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn new file mode 100644 index 0000000000..f68fc91584 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn @@ -0,0 +1,126 @@ +<?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.8.2"> + <bpmn:process id="AssignServiceInstanceBB" name="AssignServiceInstanceBB" isExecutable="true"> + <bpmn:startEvent id="Start_AssignServiceInstanceBB" name="start"> + <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="Task_CreateServiceInstance" name="Create Service Instance (AAI)" camunda:expression="${AAICreateTasks.createServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1h6t7yr</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_CreateProject" name="Create Project (AAI)" camunda:expression="${AAICreateTasks.createProject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1t55i01</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_CreateOwningEntity" name="Create Owning Entity (AAI)" camunda:expression="${AAICreateTasks.createOwningEntity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1t55i01</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0aef1l8</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_AssignServiceInstance" name="Assign Service Instance (SDNC)" camunda:expression="${SDNCAssignTasks.assignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0aef1l8</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07ea5ui</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="Start_AssignServiceInstanceBB" targetRef="Task_CreateServiceSubscription" /> + <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="Task_CreateServiceInstance" targetRef="Task_CreateProject" /> + <bpmn:sequenceFlow id="SequenceFlow_1t55i01" sourceRef="Task_CreateProject" targetRef="Task_CreateOwningEntity" /> + <bpmn:sequenceFlow id="SequenceFlow_07ea5ui" sourceRef="Task_AssignServiceInstance" targetRef="Task_UpdateServiceOstatusToAssigned" /> + <bpmn:endEvent id="End_AssignServiceInstanceBB" name="end"> + <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="Task_UpdateServiceOstatusToAssigned" targetRef="End_AssignServiceInstanceBB" /> + <bpmn:serviceTask id="Task_UpdateServiceOstatusToAssigned" name="Update Service Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_07ea5ui</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1h6t7yr" sourceRef="Task_CreateServiceSubscription" targetRef="Task_CreateServiceInstance" /> + <bpmn:serviceTask id="Task_CreateServiceSubscription" name="Create Service Subscription (AAI)" camunda:expression="${AAICreateTasks.createServiceSubscription(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1h6t7yr</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0aef1l8" sourceRef="Task_CreateOwningEntity" targetRef="Task_AssignServiceInstance" /> + </bpmn:process> + <bpmn:error id="Error_02g61p6" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignServiceInstanceBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="Start_AssignServiceInstanceBB"> + <dc:Bounds x="75" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="82" y="33" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="Task_CreateServiceInstance"> + <dc:Bounds x="285" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0oh47a9_di" bpmnElement="Task_CreateProject"> + <dc:Bounds x="426" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_06hn530_di" bpmnElement="Task_CreateOwningEntity"> + <dc:Bounds x="572" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="Task_AssignServiceInstance"> + <dc:Bounds x="714" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> + <di:waypoint xsi:type="dc:Point" x="111" y="15" /> + <di:waypoint xsi:type="dc:Point" x="148" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="84.5" y="-6" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> + <di:waypoint xsi:type="dc:Point" x="385" y="15" /> + <di:waypoint xsi:type="dc:Point" x="426" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="361.5" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1t55i01_di" bpmnElement="SequenceFlow_1t55i01"> + <di:waypoint xsi:type="dc:Point" x="526" y="15" /> + <di:waypoint xsi:type="dc:Point" x="572" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="504" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_07ea5ui_di" bpmnElement="SequenceFlow_07ea5ui"> + <di:waypoint xsi:type="dc:Point" x="814" y="15" /> + <di:waypoint xsi:type="dc:Point" x="864" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="794" y="-6" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="End_AssignServiceInstanceBB"> + <dc:Bounds x="1007" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1016" y="37" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> + <di:waypoint xsi:type="dc:Point" x="964" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1007" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="940.5" y="-6" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="Task_UpdateServiceOstatusToAssigned"> + <dc:Bounds x="864" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1h6t7yr_di" bpmnElement="SequenceFlow_1h6t7yr"> + <di:waypoint xsi:type="dc:Point" x="248" y="15" /> + <di:waypoint xsi:type="dc:Point" x="285" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="266.5" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_09fq3rp_di" bpmnElement="Task_CreateServiceSubscription"> + <dc:Bounds x="148" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0aef1l8_di" bpmnElement="SequenceFlow_0aef1l8"> + <di:waypoint xsi:type="dc:Point" x="672" y="15" /> + <di:waypoint xsi:type="dc:Point" x="714" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="693" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn new file mode 100644 index 0000000000..b7ce68eace --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn @@ -0,0 +1,95 @@ +<?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="AssignVfModuleBB" name="AssignVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="AssignVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (AAI)" camunda:expression="${AAICreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="AssignVfModule" name="Assign VF Module (SDNC)" camunda:expression="${SDNCAssignTasks.assignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0574gaa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="AssignVfModuleBB_Start" targetRef="CreateVfModule" /> + <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="CreateVfModule" targetRef="ConnectVfModuleToVolumeGroup" /> + <bpmn:endEvent id="AssignVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="UpdateVfModuleStatus" targetRef="AssignVfModuleBB_End" /> + <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VF Module Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_15hn8si</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="AssignVfModule" targetRef="UpdateVfModuleStatus" /> + <bpmn:sequenceFlow id="SequenceFlow_0574gaa" sourceRef="ConnectVfModuleToVolumeGroup" targetRef="AssignVfModule" /> + <bpmn:serviceTask id="ConnectVfModuleToVolumeGroup" name="Connect VfModule to VolumeGroup (AAI)" camunda:expression="${AAICreateTasks.connectVfModuleToVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0574gaa</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVfModuleBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="AssignVfModuleBB_Start"> + <dc:Bounds x="213" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="219" y="33" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="CreateVfModule"> + <dc:Bounds x="326" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="AssignVfModule"> + <dc:Bounds x="661" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> + <di:waypoint xsi:type="dc:Point" x="249" y="15" /> + <di:waypoint xsi:type="dc:Point" x="326" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="288" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> + <di:waypoint xsi:type="dc:Point" x="426" y="15" /> + <di:waypoint xsi:type="dc:Point" x="490" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="458" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="AssignVfModuleBB_End"> + <dc:Bounds x="1037" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1045" y="37" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> + <di:waypoint xsi:type="dc:Point" x="935" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1037" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="986" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="UpdateVfModuleStatus"> + <dc:Bounds x="835" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> + <di:waypoint xsi:type="dc:Point" x="761" y="15" /> + <di:waypoint xsi:type="dc:Point" x="835" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="798" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0574gaa_di" bpmnElement="SequenceFlow_0574gaa"> + <di:waypoint xsi:type="dc:Point" x="590" y="15" /> + <di:waypoint xsi:type="dc:Point" x="661" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="626" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0ekqpfn_di" bpmnElement="ConnectVfModuleToVolumeGroup"> + <dc:Bounds x="490" y="-25" 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 new file mode 100644 index 0000000000..f1a023910b --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -0,0 +1,177 @@ +<?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.8.2"> + <bpmn:process id="AssignVnfBB" name="AssignVnfBB" isExecutable="true"> + <bpmn:startEvent id="Start_AssignVnfBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" camunda:expression="${SDNCAssignTasks.assignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_11jum90</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0v8d14a</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="End_AssignVnfBB" name="end"> + <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_CreateVnf" name="Create Vnf (AAI)" camunda:expression="${AAICreateTasks.createVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AssignVnfBB" targetRef="Task_CreateVnf" /> + <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SDNCAdapterVnfTopologyAssign" targetRef="Task_UpdateVnfOrchestrationStatusAssigned" /> + <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_UpdateVnfOrchestrationStatusAssigned" targetRef="End_AssignVnfBB" /> + <bpmn:serviceTask id="Task_UpdateVnfOrchestrationStatusAssigned" name="Update VNF Orchestration Status Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_createInstanceGroups" name="Create Instance Groups (AAI)" camunda:expression="${AssignVnf.createInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1lppa2m</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1nle8kc</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_CreateVnf" targetRef="Task_createPlatform" /> + <bpmn:sequenceFlow id="SequenceFlow_1nle8kc" sourceRef="Task_createInstanceGroups" targetRef="ExclusiveGateway_02tchpp" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_02tchpp" name="Call Homing?" default="SequenceFlow_11jum90"> + <bpmn:incoming>SequenceFlow_1nle8kc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11jum90</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1uiok7v</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:sequenceFlow id="SequenceFlow_1uiok7v" name="yes" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_callHoming"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingV2"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1uiok7v</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0v8d14a</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_169g0ir" sourceRef="Task_createPlatform" targetRef="Task_createLineOfBusiness" /> + <bpmn:sequenceFlow id="SequenceFlow_1lppa2m" sourceRef="Task_createLineOfBusiness" targetRef="Task_createInstanceGroups" /> + <bpmn:serviceTask id="Task_createPlatform" name="Create/Connect Platform" camunda:expression="${AAICreateTasks.createPlatform(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_169g0ir</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_createLineOfBusiness" name="Create/Connect Line of Business" camunda:expression="${AAICreateTasks.createLineOfBusiness(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_169g0ir</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1lppa2m</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmn:error id="Error_0rgauy1" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVnfBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AssignVnfBB"> + <dc:Bounds x="-111" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-104" y="112" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SDNCAdapterVnfTopologyAssign"> + <dc:Bounds x="605" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AssignVnfBB"> + <dc:Bounds x="895" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="904" y="116" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_CreateVnf"> + <dc:Bounds x="-36" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> + <di:waypoint xsi:type="dc:Point" x="-75" y="94" /> + <di:waypoint xsi:type="dc:Point" x="-36" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-100" y="73" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> + <di:waypoint xsi:type="dc:Point" x="705" y="94" /> + <di:waypoint xsi:type="dc:Point" x="747" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="681" y="73" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0csh9dc_di" bpmnElement="SequenceFlow_0csh9dc"> + <di:waypoint xsi:type="dc:Point" x="847" y="94" /> + <di:waypoint xsi:type="dc:Point" x="895" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="826" y="73" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0s6d1be_di" bpmnElement="Task_UpdateVnfOrchestrationStatusAssigned"> + <dc:Bounds x="747" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0wjy7za_di" bpmnElement="Task_createInstanceGroups"> + <dc:Bounds x="351" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> + <di:waypoint xsi:type="dc:Point" x="64" y="94" /> + <di:waypoint xsi:type="dc:Point" x="96" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="35" y="73" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1nle8kc_di" bpmnElement="SequenceFlow_1nle8kc"> + <di:waypoint xsi:type="dc:Point" x="451" y="94" /> + <di:waypoint xsi:type="dc:Point" x="496" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="428.5" y="73" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_02tchpp_di" bpmnElement="ExclusiveGateway_02tchpp" isMarkerVisible="true"> + <dc:Bounds x="496" y="69" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="489" y="123" width="64" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11jum90_di" bpmnElement="SequenceFlow_11jum90"> + <di:waypoint xsi:type="dc:Point" x="546" y="94" /> + <di:waypoint xsi:type="dc:Point" x="605" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="569.5" y="73" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1uiok7v_di" bpmnElement="SequenceFlow_1uiok7v"> + <di:waypoint xsi:type="dc:Point" x="521" y="69" /> + <di:waypoint xsi:type="dc:Point" x="521" y="-23" /> + <di:waypoint xsi:type="dc:Point" x="605" y="-23" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="527" y="17.494623655913976" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0v8d14a_di" bpmnElement="SequenceFlow_0v8d14a"> + <di:waypoint xsi:type="dc:Point" x="655" y="17" /> + <di:waypoint xsi:type="dc:Point" x="655" y="54" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="670" y="29.5" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_14ye6fs_di" bpmnElement="Task_callHoming"> + <dc:Bounds x="605" y="-63" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_169g0ir_di" bpmnElement="SequenceFlow_169g0ir"> + <di:waypoint xsi:type="dc:Point" x="196" y="94" /> + <di:waypoint xsi:type="dc:Point" x="221" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="208.5" y="73" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1lppa2m_di" bpmnElement="SequenceFlow_1lppa2m"> + <di:waypoint xsi:type="dc:Point" x="321" y="94" /> + <di:waypoint xsi:type="dc:Point" x="351" y="94" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="336" y="73" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0c97kfg_di" bpmnElement="Task_createPlatform"> + <dc:Bounds x="96" y="54" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1b9yljc_di" bpmnElement="Task_createLineOfBusiness"> + <dc:Bounds x="221" y="54" 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/AssignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn new file mode 100644 index 0000000000..b1626c8a53 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn @@ -0,0 +1,52 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="AssignVolumeGroupBB" name="AssignVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="AssignVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="AssignVolumeGroupBB_Start" targetRef="AssignVolumeGroup" /> + <bpmn:endEvent id="AssignVolumeGroupBB_End"> + <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="AssignVolumeGroup" name="AssignVolumeGroup" camunda:expression="${AAICreateTasks.createVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="AssignVolumeGroup" targetRef="AssignVolumeGroupBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVolumeGroupBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="AssignVolumeGroupBB_Start"> + <dc:Bounds x="310" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="346" y="120" /> + <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="360" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="AssignVolumeGroupBB_End"> + <dc:Bounds x="662" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="635" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="AssignVolumeGroup"> + <dc:Bounds x="464" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> + <di:waypoint xsi:type="dc:Point" x="564" y="120" /> + <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="613" y="98" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn new file mode 100644 index 0000000000..6641516bfa --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn @@ -0,0 +1,68 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="ChangeModelServiceInstanceBB" name="ChangeModelServiceInstanceBB" isExecutable="true"> + <bpmn2:startEvent id="ChangeModelServiceInstance_Start" name="Start"> + <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="ChangeModelServiceInstance_End" name="End"> + <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelServiceInstance_Start" targetRef="SDNCChangeModelServiceInstance" /> + <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModelServiceInstance" targetRef="AAIUpdateModelServiceInstance" /> + <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModelServiceInstance" targetRef="ChangeModelServiceInstance_End" /> + <bpmn2:serviceTask id="SDNCChangeModelServiceInstance" name="SDNC ChangeModel ServiceInstance" camunda:expression="${SDNCChangeAssignTasks.changeModelServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="AAIUpdateModelServiceInstance" name="AAI Update Model ServiceInstance" camunda:expression="${AAIUpdateTasks.updateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> + </bpmn2:serviceTask> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmn2:error id="Error_1vf4z8q" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ChangeModelServiceInstanceBB"> + <bpmndi:BPMNShape id="StartEvent_0kbx0xk_di" bpmnElement="ChangeModelServiceInstance_Start"> + <dc:Bounds x="74.89184952978059" y="88.42789968652036" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="81" y="128" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0zsc8pz_di" bpmnElement="ChangeModelServiceInstance_End"> + <dc:Bounds x="631.6078576723498" y="88" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="641" y="128" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_18i4a05_di" bpmnElement="SequenceFlow_18i4a05"> + <di:waypoint xsi:type="dc:Point" x="111" y="106" /> + <di:waypoint xsi:type="dc:Point" x="213" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="162" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19kfk17_di" bpmnElement="SequenceFlow_19kfk17"> + <di:waypoint xsi:type="dc:Point" x="313" y="106" /> + <di:waypoint xsi:type="dc:Point" x="423" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="368" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0g502yj_di" bpmnElement="SequenceFlow_0g502yj"> + <di:waypoint xsi:type="dc:Point" x="523" y="106" /> + <di:waypoint xsi:type="dc:Point" x="632" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="577.5" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_03km5f0_di" bpmnElement="SDNCChangeModelServiceInstance"> + <dc:Bounds x="213" y="66" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModelServiceInstance"> + <dc:Bounds x="423" y="66" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn new file mode 100644 index 0000000000..a48abe25a1 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn @@ -0,0 +1,66 @@ +<?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.8.2"> + <bpmn:process id="ChangeModelVfModuleBB" name="ChangeModelVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="ChangeModelVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ChangeModelVfModuleBB_Start" targetRef="ChangeModelVfModule" /> + <bpmn:endEvent id="ChangeModelVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="ChangeModelVfModule" name="SDNC VFModule Change Model" camunda:expression="${SDNCChangeAssignTasks.changeAssignModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ChangeModelVfModule" targetRef="UpdateVfModuleModel" /> + <bpmn:serviceTask id="UpdateVfModuleModel" name="Change VFModule Model (AAI)" camunda:expression="${AAIUpdateTasks.updateModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0xsp0pv" sourceRef="UpdateVfModuleModel" targetRef="ChangeModelVfModuleBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0q258vt" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ChangeModelVfModuleBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="ChangeModelVfModuleBB_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="189.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ChangeModelVfModuleBB_End"> + <dc:Bounds x="636" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="142" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ChangeModelVfModule"> + <dc:Bounds x="260" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> + <di:waypoint xsi:type="dc:Point" x="360" y="120" /> + <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="368" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleModel"> + <dc:Bounds x="466" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> + <di:waypoint xsi:type="dc:Point" x="566" y="120" /> + <di:waypoint xsi:type="dc:Point" x="636" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="601" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn new file mode 100644 index 0000000000..68f491e1f0 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn @@ -0,0 +1,68 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="ChangeModelVnfBB" name="ChangeModelVnfBB" isExecutable="true"> + <bpmn2:startEvent id="ChangeModelVnf_Start" name="Start"> + <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="ChangeModelVnf_End" name="End"> + <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelVnf_Start" targetRef="SDNCChangeModel" /> + <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModel" targetRef="AAIUpdateModel" /> + <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModel" targetRef="ChangeModelVnf_End" /> + <bpmn2:serviceTask id="SDNCChangeModel" name="SDNC ChangeModel Vnf" camunda:expression="${SDNCChangeAssignTasks.changeModelVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="AAIUpdateModel" name="AAI Update Model Vnf" camunda:expression="${AAIUpdateTasks.updateObjectVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> + </bpmn2:serviceTask> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmn2:error id="Error_1vf4z8q" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ChangeModelVnfBB"> + <bpmndi:BPMNShape id="StartEvent_0kbx0xk_di" bpmnElement="ChangeModelVnf_Start"> + <dc:Bounds x="74.89184952978059" y="88.42789968652036" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="81" y="128" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0zsc8pz_di" bpmnElement="ChangeModelVnf_End"> + <dc:Bounds x="631.6078576723498" y="88" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="641" y="128" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_18i4a05_di" bpmnElement="SequenceFlow_18i4a05"> + <di:waypoint xsi:type="dc:Point" x="111" y="106" /> + <di:waypoint xsi:type="dc:Point" x="213" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="162" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19kfk17_di" bpmnElement="SequenceFlow_19kfk17"> + <di:waypoint xsi:type="dc:Point" x="313" y="106" /> + <di:waypoint xsi:type="dc:Point" x="423" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="368" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0g502yj_di" bpmnElement="SequenceFlow_0g502yj"> + <di:waypoint xsi:type="dc:Point" x="523" y="106" /> + <di:waypoint xsi:type="dc:Point" x="632" y="106" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="577.5" y="85" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_03km5f0_di" bpmnElement="SDNCChangeModel"> + <dc:Bounds x="213" y="66" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModel"> + <dc:Bounds x="423" y="66" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn new file mode 100644 index 0000000000..1e88963c21 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn @@ -0,0 +1,53 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="CreateCustomerBB" name="CreateCustomerBB" isExecutable="true"> + <bpmn:startEvent id="CreateCustomerBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="CreateCustomerBB_Start" targetRef="CreateCustomerAAI" /> + <bpmn:endEvent id="CreateCustomerBB_End"> + <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="CreateCustomerAAI" name="CreateCustomer (AAI)" camunda:expression="${AAICreateTasks.createCustomer(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0kfkpbh" sourceRef="CreateCustomerAAI" targetRef="CreateCustomerBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmn:error id="Error_0s1ela2" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateCustomerBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="CreateCustomerBB_Start"> + <dc:Bounds x="237" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="243" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="273" y="120" /> + <di:waypoint xsi:type="dc:Point" x="412" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="297.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="CreateCustomerBB_End"> + <dc:Bounds x="662" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="635" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_01zmebl_di" bpmnElement="CreateCustomerAAI"> + <dc:Bounds x="412" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0kfkpbh_di" bpmnElement="SequenceFlow_0kfkpbh"> + <di:waypoint xsi:type="dc:Point" x="512" y="120" /> + <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="542" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn new file mode 100644 index 0000000000..b91e2df8f7 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn @@ -0,0 +1,198 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="CreateNetworkBB" name="CreateNetworkBB" isExecutable="true"> + <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="createNetwork_EndEvent" name="End Flow"> + <bpmn2:incoming>SequenceFlow_0sissul</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:serviceTask id="QueryVpnBinding_ServiceTask" name="Query Vpn Binding in AAI" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1oc7wcr</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0n42zi5</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="Create_Network_ServiceTask" name="Create Network" camunda:expression="${NetworkAdapterCreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1eqfh23</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0innva6</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="QueryNetworkPolicy_ServiceTask" name="Query Network Policy in AAI" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0n42zi5</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1yy4aik</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="QueryNetworkTableRef_ServiceTask" name="Query Network TableRef in AAI" camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1yy4aik</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1h9kkhb</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name="Update Network in AAI" camunda:expression="${AAIUpdateTasks.updateNetworkCreated(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0innva6</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0sissul</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_0n42zi5" sourceRef="QueryVpnBinding_ServiceTask" targetRef="QueryNetworkPolicy_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_1yy4aik" sourceRef="QueryNetworkPolicy_ServiceTask" targetRef="QueryNetworkTableRef_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0innva6" sourceRef="Create_Network_ServiceTask" targetRef="Update_Network_AAI_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0sissul" sourceRef="Update_Network_AAI_ServiceTask" targetRef="createNetwork_EndEvent" /> + <bpmn2:serviceTask id="QueryNetworkById_ServiceTask" name="Re-Query Network in AAI" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetwork_startEvent" targetRef="QueryNetworkById_ServiceTask" /> + <bpmn2:intermediateThrowEvent id="ThrowEvent_ToCollectAAIData" name="ThrowEvent_ToCollectAAIData"> + <bpmn2:incoming>SequenceFlow_03ebe6c</bpmn2:incoming> + <bpmn2:linkEventDefinition name="CatchEvent_Collect_AAI_Data" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:intermediateCatchEvent id="CatchEvent_Collect_AAI_Data" name="CatchEvent_Collect_AAI_Data"> + <bpmn2:outgoing>SequenceFlow_1oc7wcr</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="CatchEvent_Collect_AAI_Data" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateCatchEvent id="CatchEvent_Create_Network" name="CatchEvent_Create_Network"> + <bpmn2:outgoing>SequenceFlow_1eqfh23</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="CatchEvent_Create_Network" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateThrowEvent id="ThrowEvent_ToCreateNetwork" name="ThrowEvent_ToCreateNetwork"> + <bpmn2:incoming>SequenceFlow_1h9kkhb</bpmn2:incoming> + <bpmn2:linkEventDefinition name="CatchEvent_Create_Network" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1h9kkhb" sourceRef="QueryNetworkTableRef_ServiceTask" targetRef="ThrowEvent_ToCreateNetwork" /> + <bpmn2:sequenceFlow id="SequenceFlow_1oc7wcr" sourceRef="CatchEvent_Collect_AAI_Data" targetRef="QueryVpnBinding_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_1eqfh23" sourceRef="CatchEvent_Create_Network" targetRef="Create_Network_ServiceTask" /> + <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_03ebe6c</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="QueryNetworkById_ServiceTask" targetRef="ServiceTask_get_cloud_region" /> + <bpmn2:sequenceFlow id="SequenceFlow_03ebe6c" sourceRef="ServiceTask_get_cloud_region" targetRef="ThrowEvent_ToCollectAAIData" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetwork_startEvent"> + <dc:Bounds x="236" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="230" y="-14" width="48" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetwork_EndEvent"> + <dc:Bounds x="656" y="326" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="652" y="362" width="45" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="QueryVpnBinding_ServiceTask"> + <dc:Bounds x="340" y="91" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="Create_Network_ServiceTask"> + <dc:Bounds x="346" y="304" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1glneas_di" bpmnElement="QueryNetworkPolicy_ServiceTask"> + <dc:Bounds x="503" y="91" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_00rw5co_di" bpmnElement="QueryNetworkTableRef_ServiceTask"> + <dc:Bounds x="663" y="91" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0q51h0f_di" bpmnElement="Update_Network_AAI_ServiceTask"> + <dc:Bounds x="499" y="304" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0n42zi5_di" bpmnElement="SequenceFlow_0n42zi5"> + <di:waypoint xsi:type="dc:Point" x="440" y="131" /> + <di:waypoint xsi:type="dc:Point" x="503" y="131" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="472" y="106" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1yy4aik_di" bpmnElement="SequenceFlow_1yy4aik"> + <di:waypoint xsi:type="dc:Point" x="603" y="131" /> + <di:waypoint xsi:type="dc:Point" x="663" y="131" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="633" y="106" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0innva6_di" bpmnElement="SequenceFlow_0innva6"> + <di:waypoint xsi:type="dc:Point" x="446" y="344" /> + <di:waypoint xsi:type="dc:Point" x="499" y="344" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="473" y="319" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0sissul_di" bpmnElement="SequenceFlow_0sissul"> + <di:waypoint xsi:type="dc:Point" x="599" y="344" /> + <di:waypoint xsi:type="dc:Point" x="656" y="344" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="628" y="319" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="QueryNetworkById_ServiceTask"> + <dc:Bounds x="346" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1maepy7_di" bpmnElement="SequenceFlow_1maepy7"> + <di:waypoint xsi:type="dc:Point" x="272" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="346" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="309" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0fexg2g_di" bpmnElement="ThrowEvent_ToCollectAAIData"> + <dc:Bounds x="666" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="709" y="-43" width="85" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_1plrukk_di" bpmnElement="CatchEvent_Collect_AAI_Data"> + <dc:Bounds x="236" y="113" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="216" y="154" width="81" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_1n0vun1_di" bpmnElement="CatchEvent_Create_Network"> + <dc:Bounds x="236" y="326" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="213" y="367" width="87" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_04qwhex_di" bpmnElement="ThrowEvent_ToCreateNetwork"> + <dc:Bounds x="827" y="113" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="868" y="125" width="89" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1h9kkhb_di" bpmnElement="SequenceFlow_1h9kkhb"> + <di:waypoint xsi:type="dc:Point" x="763" y="131" /> + <di:waypoint xsi:type="dc:Point" x="827" y="131" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="795" y="116" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1oc7wcr_di" bpmnElement="SequenceFlow_1oc7wcr"> + <di:waypoint xsi:type="dc:Point" x="272" y="131" /> + <di:waypoint xsi:type="dc:Point" x="340" y="131" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="306" y="106" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1eqfh23_di" bpmnElement="SequenceFlow_1eqfh23"> + <di:waypoint xsi:type="dc:Point" x="272" y="344" /> + <di:waypoint xsi:type="dc:Point" x="346" y="344" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="309" y="319" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_02qnccl_di" bpmnElement="ServiceTask_get_cloud_region"> + <dc:Bounds x="499" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06rq9pi_di" bpmnElement="SequenceFlow_06rq9pi"> + <di:waypoint xsi:type="dc:Point" x="446" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="499" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="473" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_03ebe6c_di" bpmnElement="SequenceFlow_03ebe6c"> + <di:waypoint xsi:type="dc:Point" x="599" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="666" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="633" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn new file mode 100644 index 0000000000..c6c3599449 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn @@ -0,0 +1,112 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" 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"> + <bpmn2:process id="CreateNetworkCollectionBB" name="CreateNetworkCollectionBB" isExecutable="true"> + <bpmn2:startEvent id="createNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="createNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:incoming>SequenceFlow_0hhklb4</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:serviceTask id="BuildName_ServiceTask" name="Buld Collection and Instance Names" camunda:expression="${CreateNetworkCollection.buildNetworkCollectionName(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetworkCollection_startEvent" targetRef="BuildName_ServiceTask" /> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollection" name="Create Network Collection in AAI " camunda:expression="${AAICreateTasks.createNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_05yxpu5</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="BuildName_ServiceTask" targetRef="ServiceTask_create_NetworkCollection" /> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollectionInstanceGroup" name="Create Network Collection Instance Group in AAI " camunda:expression="${AAICreateTasks.createNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_05yxpu5</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0z4c30j</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_InstanceGroup" name="Connect Collection to InstanceGroup " camunda:expression="${CreateNetworkCollection.connectCollectionToInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:incoming>SequenceFlow_0z4c30j</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1hij1px</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_05yxpu5" sourceRef="ServiceTask_create_NetworkCollection" targetRef="ServiceTask_create_NetworkCollectionInstanceGroup" /> + <bpmn2:sequenceFlow id="SequenceFlow_0z4c30j" sourceRef="ServiceTask_create_NetworkCollectionInstanceGroup" targetRef="ServiceTask_Connect_Collection_to_InstanceGroup" /> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_ServiceInstance" name="Connect Collection to ServiceInstance " camunda:expression="${CreateNetworkCollection.connectCollectionToServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:incoming>SequenceFlow_1hij1px</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0hhklb4</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_1hij1px" sourceRef="ServiceTask_Connect_Collection_to_InstanceGroup" targetRef="ServiceTask_Connect_Collection_to_ServiceInstance" /> + <bpmn2:sequenceFlow id="SequenceFlow_0hhklb4" sourceRef="ServiceTask_Connect_Collection_to_ServiceInstance" targetRef="createNetworkCollection_EndEvent" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateNetworkCollectionBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetworkCollection_startEvent"> + <dc:Bounds x="236" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="230" y="-14" width="48" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetworkCollection_EndEvent"> + <dc:Bounds x="1132" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1128" y="-19" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="BuildName_ServiceTask"> + <dc:Bounds x="346" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1maepy7_di" bpmnElement="SequenceFlow_1maepy7"> + <di:waypoint xsi:type="dc:Point" x="272" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="346" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="309" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_02qnccl_di" bpmnElement="ServiceTask_create_NetworkCollection"> + <dc:Bounds x="508" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06rq9pi_di" bpmnElement="SequenceFlow_06rq9pi"> + <di:waypoint xsi:type="dc:Point" x="446" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="508" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="477" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1ae59gw_di" bpmnElement="ServiceTask_create_NetworkCollectionInstanceGroup"> + <dc:Bounds x="671" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r7c1iy_di" bpmnElement="ServiceTask_Connect_Collection_to_InstanceGroup"> + <dc:Bounds x="817" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05yxpu5_di" bpmnElement="SequenceFlow_05yxpu5"> + <di:waypoint xsi:type="dc:Point" x="608" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="671" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="640" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0z4c30j_di" bpmnElement="SequenceFlow_0z4c30j"> + <di:waypoint xsi:type="dc:Point" x="771" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="817" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="794" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_15u6tzt_di" bpmnElement="ServiceTask_Connect_Collection_to_ServiceInstance"> + <dc:Bounds x="982" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1hij1px_di" bpmnElement="SequenceFlow_1hij1px"> + <di:waypoint xsi:type="dc:Point" x="917" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="982" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="950" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0hhklb4_di" bpmnElement="SequenceFlow_0hhklb4"> + <di:waypoint xsi:type="dc:Point" x="1082" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="1132" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1107" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn new file mode 100644 index 0000000000..7691498bd0 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn @@ -0,0 +1,115 @@ +<?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.10.0"> + <bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="CreateVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="QueryVfModule" name="Query VF Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1s4rpyp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="CreateVfModuleBB_Start" targetRef="QueryVnf" /> + <bpmn:endEvent id="CreateVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_1stomxq</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (VNF)" camunda:expression="${VnfAdapterCreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_15hn8si</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_16g4dz0</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="QueryVfModule" targetRef="CreateVfModule" /> + <bpmn:sequenceFlow id="SequenceFlow_1s4rpyp" sourceRef="QueryVnf" targetRef="QueryVfModule" /> + <bpmn:serviceTask id="QueryVnf" name="Query VNF (SDNC)" camunda:expression="${SDNCQueryTasks.queryVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1s4rpyp</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_16g4dz0" sourceRef="CreateVfModule" targetRef="VnfAdapter" /> + <bpmn:sequenceFlow id="SequenceFlow_0ecr393" sourceRef="VnfAdapter" targetRef="UpdateVfModuleStatus" /> + <bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_16g4dz0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ecr393</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1stomxq" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" /> + <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VfModule Ostatus to Created (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1stomxq</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="CreateVfModuleBB_Start"> + <dc:Bounds x="213" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="219" y="33" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="QueryVfModule"> + <dc:Bounds x="529" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> + <di:waypoint xsi:type="dc:Point" x="249" y="15" /> + <di:waypoint xsi:type="dc:Point" x="329" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="289" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="CreateVfModuleBB_End"> + <dc:Bounds x="1259" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1267" y="37" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="CreateVfModule"> + <dc:Bounds x="725" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> + <di:waypoint xsi:type="dc:Point" x="629" y="15" /> + <di:waypoint xsi:type="dc:Point" x="725" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="677" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1s4rpyp_di" bpmnElement="SequenceFlow_1s4rpyp"> + <di:waypoint xsi:type="dc:Point" x="429" y="15" /> + <di:waypoint xsi:type="dc:Point" x="529" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="479" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1frb5h2_di" bpmnElement="QueryVnf"> + <dc:Bounds x="329" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_16g4dz0_di" bpmnElement="SequenceFlow_16g4dz0"> + <di:waypoint xsi:type="dc:Point" x="825" y="15" /> + <di:waypoint xsi:type="dc:Point" x="890" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="857.5" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ecr393_di" bpmnElement="SequenceFlow_0ecr393"> + <di:waypoint xsi:type="dc:Point" x="990" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1065" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1028" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1i1pfzb_di" bpmnElement="VnfAdapter"> + <dc:Bounds x="890" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1stomxq_di" bpmnElement="SequenceFlow_1stomxq"> + <di:waypoint xsi:type="dc:Point" x="1165" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1259" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1212" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0fpfn71_di" bpmnElement="UpdateVfModuleStatus"> + <dc:Bounds x="1065" y="-25" 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/CreateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn new file mode 100644 index 0000000000..58a429dcc5 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn @@ -0,0 +1,102 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> + <bpmn:process id="CreateVolumeGroupBB" name="CreateVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="CreateVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="CreateVolumeGroupBB_Start" targetRef="QueryVfModuleSDNC" /> + <bpmn:endEvent id="CreateVolumeGroupBB_End"> + <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="CreateVolumeGroupVnfAdapter" name="CreateVolumeGroupVnfAdapter Request" camunda:expression="${VnfAdapterCreateTasks.createVolumeGroupRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06q6g74</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0kfkpbh" sourceRef="CreateVolumeGroupVnfAdapter" targetRef="Vnf_Adapter" /> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="UpdateVolumeGroupAAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06flg6h</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="CreateVolumeGroupBB_End" /> + <bpmn:serviceTask id="QueryVfModuleSDNC" name="Query Vf Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModuleForVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_06q6g74</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_06q6g74" sourceRef="QueryVfModuleSDNC" targetRef="CreateVolumeGroupVnfAdapter" /> + <bpmn:callActivity id="Vnf_Adapter" name="Vnf Adapter" calledElement="VnfAdapter"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_06flg6h</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_06flg6h" sourceRef="Vnf_Adapter" targetRef="UpdateVolumeGroupAAI" /> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVolumeGroupBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="CreateVolumeGroupBB_Start"> + <dc:Bounds x="237" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="243" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="273" y="120" /> + <di:waypoint xsi:type="dc:Point" x="326" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="254.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="CreateVolumeGroupBB_End"> + <dc:Bounds x="928" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="901" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_01zmebl_di" bpmnElement="CreateVolumeGroupVnfAdapter"> + <dc:Bounds x="476" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0kfkpbh_di" bpmnElement="SequenceFlow_0kfkpbh"> + <di:waypoint xsi:type="dc:Point" x="576" y="120" /> + <di:waypoint xsi:type="dc:Point" x="629" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="557.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="UpdateVolumeGroupAAI"> + <dc:Bounds x="776" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> + <di:waypoint xsi:type="dc:Point" x="876" y="120" /> + <di:waypoint xsi:type="dc:Point" x="928" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="857" y="98.5" width="90" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1wythmn_di" bpmnElement="QueryVfModuleSDNC"> + <dc:Bounds x="326" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06q6g74_di" bpmnElement="SequenceFlow_06q6g74"> + <di:waypoint xsi:type="dc:Point" x="426" y="120" /> + <di:waypoint xsi:type="dc:Point" x="476" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="451" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1220w7e_di" bpmnElement="Vnf_Adapter"> + <dc:Bounds x="629" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06flg6h_di" bpmnElement="SequenceFlow_06flg6h"> + <di:waypoint xsi:type="dc:Point" x="729" y="120" /> + <di:waypoint xsi:type="dc:Point" x="776" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="752.5" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn new file mode 100644 index 0000000000..836f52b9be --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn @@ -0,0 +1,72 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="DeactivateNetworkBB" name="DeactivateNetworkBB" isExecutable="true"> + <bpmn2:startEvent id="DeactivateNetworkBB_Start" name="Start"> + <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="DeactivateNetworkBB_End" name="End"> + <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:serviceTask id="DeactivateNetworkSDNC" name="Deactivate Network (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="DeactivateNetworkAAI" name="Deactivate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_05elmhj" sourceRef="DeactivateNetworkBB_Start" targetRef="DeactivateNetworkSDNC" /> + <bpmn2:sequenceFlow id="SequenceFlow_0xbvwsu" sourceRef="DeactivateNetworkSDNC" targetRef="DeactivateNetworkAAI" /> + <bpmn2:sequenceFlow id="SequenceFlow_18atf08" sourceRef="DeactivateNetworkAAI" targetRef="DeactivateNetworkBB_End" /> + </bpmn2:process> + <bpmn2:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateNetworkBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="DeactivateNetworkBB_Start"> + <dc:Bounds x="545" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="551" y="-14" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="DeactivateNetworkBB_End"> + <dc:Bounds x="975" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="985" y="-19" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="DeactivateNetworkSDNC"> + <dc:Bounds x="653" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="DeactivateNetworkAAI"> + <dc:Bounds x="802" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> + <di:waypoint xsi:type="dc:Point" x="581" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="653" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="617" y="-62" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0xbvwsu_di" bpmnElement="SequenceFlow_0xbvwsu"> + <di:waypoint xsi:type="dc:Point" x="753" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="802" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="793" y="-37" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> + <di:waypoint xsi:type="dc:Point" x="902" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="975" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="954" y="-37" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn new file mode 100644 index 0000000000..80faf1378c --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn @@ -0,0 +1,66 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="DeactivateServiceInstanceBB" name="DeactivateServiceInstanceBB" isExecutable="true"> + <bpmn:startEvent id="Start_DeactivateServiceInstanceBB" name="Start"> + <bpmn:outgoing>SequenceFlow_101w1ck</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_DeactivateServiceInstanceBB" name="end"> + <bpmn:incoming>SequenceFlow_0pioehv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_DeactivateServiceInstance_SDNC" targetRef="Task_DeactivateServiceInstance_AAI" /> + <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_DeactivateServiceInstance_AAI" targetRef="End_DeactivateServiceInstanceBB" /> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_AAI" name="Update Service OStatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_SDNC" name="Service Instance Deactivate (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_101w1ck</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_101w1ck" sourceRef="Start_DeactivateServiceInstanceBB" targetRef="Task_DeactivateServiceInstance_SDNC" /> + </bpmn:process> + <bpmn:error id="Error_05rnr6a" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateServiceInstanceBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_DeactivateServiceInstanceBB"> + <dc:Bounds x="23" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="29" y="138" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1qdtskz_di" bpmnElement="End_DeactivateServiceInstanceBB"> + <dc:Bounds x="416" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="425" y="142" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_00q7fsg_di" bpmnElement="SequenceFlow_00q7fsg"> + <di:waypoint xsi:type="dc:Point" x="216" y="120" /> + <di:waypoint xsi:type="dc:Point" x="262" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="239" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0pioehv_di" bpmnElement="SequenceFlow_0pioehv"> + <di:waypoint xsi:type="dc:Point" x="362" y="120" /> + <di:waypoint xsi:type="dc:Point" x="416" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="389" y="99" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1d9vh4e_di" bpmnElement="Task_DeactivateServiceInstance_AAI"> + <dc:Bounds x="262" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_04l854m_di" bpmnElement="Task_DeactivateServiceInstance_SDNC"> + <dc:Bounds x="116" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_101w1ck_di" bpmnElement="SequenceFlow_101w1ck"> + <di:waypoint xsi:type="dc:Point" x="59" y="120" /> + <di:waypoint xsi:type="dc:Point" x="116" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="87.5" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn new file mode 100644 index 0000000000..85cde2aca7 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn @@ -0,0 +1,70 @@ +<?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.8.2"> + <bpmn:process id="DeactivateVfModuleBB" name="DeactivateVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="DeactivateVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_0m379r2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="DeactivateVfModule" name="SDNC Vf Module Deactivate " camunda:expression="${SDNCDeactivateTasks.deactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0m379r2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01bdpek</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0m379r2" sourceRef="DeactivateVfModuleBB_Start" targetRef="DeactivateVfModule" /> + <bpmn:serviceTask id="UpdateVfModuleDeactivateStatus" name="Deactivate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_01bdpek</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1y1c7fh</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_01bdpek" sourceRef="DeactivateVfModule" targetRef="UpdateVfModuleDeactivateStatus" /> + <bpmn:endEvent id="DeactivateVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_1y1c7fh</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1y1c7fh" sourceRef="UpdateVfModuleDeactivateStatus" targetRef="DeactivateVfModuleBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0qg4xhp" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateVfModuleBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="DeactivateVfModuleBB_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0rz90rp_di" bpmnElement="DeactivateVfModule"> + <dc:Bounds x="275" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0m379r2_di" bpmnElement="SequenceFlow_0m379r2"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="275" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="242" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0lyevan_di" bpmnElement="UpdateVfModuleDeactivateStatus"> + <dc:Bounds x="432" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_01bdpek_di" bpmnElement="SequenceFlow_01bdpek"> + <di:waypoint xsi:type="dc:Point" x="375" y="120" /> + <di:waypoint xsi:type="dc:Point" x="401" y="120" /> + <di:waypoint xsi:type="dc:Point" x="401" y="120" /> + <di:waypoint xsi:type="dc:Point" x="432" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="416" y="114" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1h4ik86_di" bpmnElement="DeactivateVfModuleBB_End"> + <dc:Bounds x="589" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="598" y="142" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1y1c7fh_di" bpmnElement="SequenceFlow_1y1c7fh"> + <di:waypoint xsi:type="dc:Point" x="532" y="120" /> + <di:waypoint xsi:type="dc:Point" x="557" y="120" /> + <di:waypoint xsi:type="dc:Point" x="557" y="120" /> + <di:waypoint xsi:type="dc:Point" x="589" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="572" y="114" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn new file mode 100644 index 0000000000..d6b7dd6534 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn @@ -0,0 +1,65 @@ +<?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.8.2"> + <bpmn:process id="DeactivateVnfBB" name="DeactivateVnfBB" isExecutable="true"> + <bpmn:startEvent id="Start_DeactivateVnfBB" name="start"> + <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0k9qnoi" sourceRef="Start_DeactivateVnfBB" targetRef="Task_SDNCAdapterVnfTopologyDeactivate" /> + <bpmn:sequenceFlow id="SequenceFlow_0r6pzwt" sourceRef="Task_SDNCAdapterVnfTopologyDeactivate" targetRef="Task_DeactivateOrchestrationStatusVnf" /> + <bpmn:endEvent id="End_DeactivateVnfBB" name="end"> + <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_DeactivateOrchestrationStatusVnf" targetRef="End_DeactivateVnfBB" /> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyDeactivate" name="Call SDNC Adapter VNF Topology Deactivate" camunda:expression="${SDNCDeactivateTasks.deactivateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_DeactivateOrchestrationStatusVnf" name="Deactivate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateVnfBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_DeactivateVnfBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0k9qnoi_di" bpmnElement="SequenceFlow_0k9qnoi"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="263" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="236" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0r6pzwt_di" bpmnElement="SequenceFlow_0r6pzwt"> + <di:waypoint xsi:type="dc:Point" x="363" y="120" /> + <di:waypoint xsi:type="dc:Point" x="422" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="392.5" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1ad7eym_di" bpmnElement="End_DeactivateVnfBB"> + <dc:Bounds x="572" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="580" y="142" width="20" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0vnitwg_di" bpmnElement="SequenceFlow_0vnitwg"> + <di:waypoint xsi:type="dc:Point" x="522" y="120" /> + <di:waypoint xsi:type="dc:Point" x="572" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="547" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1k98q3r_di" bpmnElement="Task_SDNCAdapterVnfTopologyDeactivate"> + <dc:Bounds x="263" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1vg25fs_di" bpmnElement="Task_DeactivateOrchestrationStatusVnf"> + <dc:Bounds x="422" 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/DeactivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn new file mode 100644 index 0000000000..2b2e30b773 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn @@ -0,0 +1,52 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="DeactivateVolumeGroupBB" name="DeactivateVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="DeactivateVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="DeactivateVolumeGroupBB_Start" targetRef="DeactivateVolumeGroup" /> + <bpmn:endEvent id="DeactivateVolumeGroupBB_End"> + <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="DeactivateVolumeGroup" name="Deactivate VolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="DeactivateVolumeGroup" targetRef="DeactivateVolumeGroupBB_End" /> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateVolumeGroupBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="DeactivateVolumeGroupBB_Start"> + <dc:Bounds x="310" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="138" width="25" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="346" y="120" /> + <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="360" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="DeactivateVolumeGroupBB_End"> + <dc:Bounds x="662" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="635" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="DeactivateVolumeGroup"> + <dc:Bounds x="464" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> + <di:waypoint xsi:type="dc:Point" x="564" y="120" /> + <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="613" y="98" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn new file mode 100644 index 0000000000..faa40600a5 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn @@ -0,0 +1,75 @@ +<?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.8.2"> + <bpmn:process id="DeleteNetworkBB" name="DeleteNetworkBB" isExecutable="true"> + <bpmn:startEvent id="deleteNetwork_startEvent" name="Start Flow"> + <bpmn:outgoing>SequenceFlow_1mc3d3f</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="updateNetworkAAI" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1c906im</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0nhd7b7</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1mc3d3f" sourceRef="deleteNetwork_startEvent" targetRef="deleteNetworkAIC" /> + <bpmn:sequenceFlow id="SequenceFlow_1c906im" sourceRef="deleteNetworkAIC" targetRef="updateNetworkAAI" /> + <bpmn:serviceTask id="deleteNetworkAIC" name="Delete Network (AIC)" camunda:expression="${NetworkAdapterDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1mc3d3f</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1c906im</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="deleteNetwork_endEvent" name="End Flow"> + <bpmn:incoming>SequenceFlow_0nhd7b7</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0nhd7b7" sourceRef="updateNetworkAAI" targetRef="deleteNetwork_endEvent" /> + </bpmn:process> + <bpmn:error id="Error_1l8dsnn" name="Error_31mlvpb" /> + <bpmn:error id="Error_0wyyz4k" name="Error_0v8f773" /> + <bpmn:error id="Error_1ui7vvm" name="Error_3703qe3" /> + <bpmn:error id="Error_0c13wbp" name="Error_0av3nvt" /> + <bpmn:error id="Error_0qenwdc" name="Error_3grcf9g" /> + <bpmn:error id="Error_0hni6ow" name="Error_365cfsb" /> + <bpmn:error id="Error_13jnk26" name="Error_2jchgl6" /> + <bpmn:error id="Error_1vtcme2" name="Error_2sa2hno" /> + <bpmn:error id="Error_0azq0vl" name="Error_2rv3fi4" /> + <bpmn:error id="Error_149efv9" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetwork_startEvent"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="166" y="138" width="50" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0zd65z2_di" bpmnElement="updateNetworkAAI"> + <dc:Bounds x="555" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1mc3d3f_di" bpmnElement="SequenceFlow_1mc3d3f"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="320" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="219.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1c906im_di" bpmnElement="SequenceFlow_1c906im"> + <di:waypoint xsi:type="dc:Point" x="420" y="120" /> + <di:waypoint xsi:type="dc:Point" x="555" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="442.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1gcfuzf_di" bpmnElement="deleteNetworkAIC"> + <dc:Bounds x="320" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_02vxchc_di" bpmnElement="deleteNetwork_endEvent"> + <dc:Bounds x="806" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="801" y="142" width="46" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0nhd7b7_di" bpmnElement="SequenceFlow_0nhd7b7"> + <di:waypoint xsi:type="dc:Point" x="655" y="120" /> + <di:waypoint xsi:type="dc:Point" x="806" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="685.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkCollectionBB.bpmn new file mode 100644 index 0000000000..f6d028585a --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkCollectionBB.bpmn @@ -0,0 +1,67 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> + <bpmn2:process id="DeleteNetworkCollectionBB" name="DeleteNetworkCollectionBB" isExecutable="true"> + <bpmn2:startEvent id="deleteNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:endEvent id="deleteNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:incoming>SequenceFlow_0lju8aw</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="deleteNetworkCollection_startEvent" targetRef="ServiceTask_delete_NetworkCollectionInstanceGroup" /> + <bpmn2:serviceTask id="ServiceTask_delete_NetworkCollectionInstanceGroup" name="Delete Network Collection Instance Group in AAI " camunda:expression="${AAIDeleteTasks.deleteInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0v9bqr9</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:serviceTask id="ServiceTask_delete_NetworkCollection" name="Delete Network Collection in AAI " camunda:expression="${AAIDeleteTasks.deleteCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0v9bqr9</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0lju8aw</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_0v9bqr9" sourceRef="ServiceTask_delete_NetworkCollectionInstanceGroup" targetRef="ServiceTask_delete_NetworkCollection" /> + <bpmn2:sequenceFlow id="SequenceFlow_0lju8aw" sourceRef="ServiceTask_delete_NetworkCollection" targetRef="deleteNetworkCollection_EndEvent" /> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteNetworkCollectionBB"> + <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="deleteNetworkCollection_startEvent"> + <dc:Bounds x="390" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="383" y="-14" width="49" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="deleteNetworkCollection_EndEvent"> + <dc:Bounds x="835" y="-55" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="831" y="-19" width="45" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1maepy7_di" bpmnElement="SequenceFlow_1maepy7"> + <di:waypoint xsi:type="dc:Point" x="426" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="508" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="467" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_02qnccl_di" bpmnElement="ServiceTask_delete_NetworkCollectionInstanceGroup"> + <dc:Bounds x="508" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0re3yzu_di" bpmnElement="ServiceTask_delete_NetworkCollection"> + <dc:Bounds x="668" y="-77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0v9bqr9_di" bpmnElement="SequenceFlow_0v9bqr9"> + <di:waypoint xsi:type="dc:Point" x="608" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="668" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="638" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0lju8aw_di" bpmnElement="SequenceFlow_0lju8aw"> + <di:waypoint xsi:type="dc:Point" x="768" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="835" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="802" y="-52" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn new file mode 100644 index 0000000000..408e378bcf --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn @@ -0,0 +1,85 @@ +<?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.10.0"> + <bpmn:process id="DeleteVfModuleBB" name="Start" isExecutable="true"> + <bpmn:startEvent id="DeleteVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1537yw5</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="DeleteVfModuleVnfAdapter" name="Delete Vf Module VnfAdapter" camunda:expression="${VnfAdapterDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1537yw5</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_08tvhtf</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1537yw5" sourceRef="DeleteVfModuleBB_Start" targetRef="DeleteVfModuleVnfAdapter" /> + <bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name="Update OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_02lpx87</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1mxrfqv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_08tvhtf" sourceRef="DeleteVfModuleVnfAdapter" targetRef="VnfAdapter" /> + <bpmn:endEvent id="DeleteVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_1mxrfqv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1mxrfqv" sourceRef="UpdateVfModuleDeleteStatus" targetRef="DeleteVfModuleBB_End" /> + <bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_08tvhtf</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_02lpx87</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_02lpx87" sourceRef="VnfAdapter" targetRef="UpdateVfModuleDeleteStatus" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="DeleteVfModuleBB_Start"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_16798zf_di" bpmnElement="DeleteVfModuleVnfAdapter"> + <dc:Bounds x="261" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1537yw5_di" bpmnElement="SequenceFlow_1537yw5"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="261" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="190" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0pbhsub_di" bpmnElement="UpdateVfModuleDeleteStatus"> + <dc:Bounds x="593" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_08tvhtf_di" bpmnElement="SequenceFlow_08tvhtf"> + <di:waypoint xsi:type="dc:Point" x="361" y="120" /> + <di:waypoint xsi:type="dc:Point" x="427" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="349" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1rn6yvh_di" bpmnElement="DeleteVfModuleBB_End"> + <dc:Bounds x="746" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="754" y="142" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1mxrfqv_di" bpmnElement="SequenceFlow_1mxrfqv"> + <di:waypoint xsi:type="dc:Point" x="693" y="120" /> + <di:waypoint xsi:type="dc:Point" x="746" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="674.5" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0whogn3_di" bpmnElement="VnfAdapter"> + <dc:Bounds x="427" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_02lpx87_di" bpmnElement="SequenceFlow_02lpx87"> + <di:waypoint xsi:type="dc:Point" x="527" y="120" /> + <di:waypoint xsi:type="dc:Point" x="593" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="560" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn new file mode 100644 index 0000000000..6fd7773714 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn @@ -0,0 +1,67 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> + <bpmn:process id="DeleteVolumeGroupBB" name="DeleteVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="DeleteVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="DeleteVolumeGroupBB_Start" targetRef="DeleteVolumeGroupVnfAdapter" /> + <bpmn:endEvent id="DeleteVolumeGroupBB_End"> + <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="Update Volume Group A&AI (AAI Assigned)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_13ngwev</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="DeleteVolumeGroupBB_End" /> + <bpmn:sequenceFlow id="SequenceFlow_13ngwev" sourceRef="DeleteVolumeGroupVnfAdapter" targetRef="UpdateVolumeGroupAAI" /> + <bpmn:serviceTask id="DeleteVolumeGroupVnfAdapter" name="Delete Volume Group Vnf Adapter (AIC Delete)" camunda:expression="${VnfAdapterDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_13ngwev</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> + <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVolumeGroupBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="DeleteVolumeGroupBB_Start"> + <dc:Bounds x="310" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="138" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> + <di:waypoint xsi:type="dc:Point" x="346" y="120" /> + <di:waypoint xsi:type="dc:Point" x="388" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="322" y="99" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="DeleteVolumeGroupBB_End"> + <dc:Bounds x="684" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="657" y="142" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="UpdateVolumeGroupAAI"> + <dc:Bounds x="525" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> + <di:waypoint xsi:type="dc:Point" x="625" y="120" /> + <di:waypoint xsi:type="dc:Point" x="684" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="609.5" y="98.5" width="90" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_13ngwev_di" bpmnElement="SequenceFlow_13ngwev"> + <di:waypoint xsi:type="dc:Point" x="488" y="120" /> + <di:waypoint xsi:type="dc:Point" x="525" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="506.5" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1nrp0hb_di" bpmnElement="DeleteVolumeGroupVnfAdapter"> + <dc:Bounds x="388" 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/ExecuteBuildingBlock.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn new file mode 100644 index 0000000000..8640f7e069 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn @@ -0,0 +1,310 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> + <bpmn:process id="ExecuteBuildingBlock" name="ExecuteBuildingBlock" isExecutable="true"> + <bpmn:startEvent id="Start_ExecuteBuildingBlock" name="start"> + <bpmn:outgoing>SequenceFlow_0rq4c5r</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:callActivity id="Call_BBToExecute" name="BB to Execute" calledElement="${flowToBeCalled}"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + </bpmn:extensionElements> + <bpmn:incoming>Continue</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01h9qmz</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_0rq4c5r" sourceRef="Start_ExecuteBuildingBlock" targetRef="Task_BBInputSetup" /> + <bpmn:sequenceFlow id="SequenceFlow_0uzwjrq" sourceRef="Task_BBInputSetup" targetRef="StatusPolicy" /> + <bpmn:serviceTask id="Task_BBInputSetup" name="BB Input Setup" camunda:expression="${BBInputSetup.execute(execution)}"> + <bpmn:incoming>SequenceFlow_0rq4c5r</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0uzwjrq</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="End_ExecuteBuildingBlock" name="end"> + <bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1ryv9sh</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_01h9qmz" sourceRef="Call_BBToExecute" targetRef="End_ExecuteBuildingBlock" /> + <bpmn:sequenceFlow id="Continue" name="Continue" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="Call_BBToExecute" /> + <bpmn:serviceTask id="StatusPolicy" name="StatusPolicy" camunda:expression="${OrchestrationStatusValidator.validateOrchestrationStatus(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0uzwjrq</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0je0y25</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1ryv9sh" name="SilentSuccess" sourceRef="CheckOrchestrationStatusValidationResults" targetRef="End_ExecuteBuildingBlock"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("orchestrationStatusValidationResult").name() == "SILENT_SUCCESS"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:exclusiveGateway id="CheckOrchestrationStatusValidationResults" name="Check OrchestrationStatus Validation Results" default="Continue"> + <bpmn:incoming>SequenceFlow_0je0y25</bpmn:incoming> + <bpmn:outgoing>Continue</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1ryv9sh</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" /> + <bpmn:boundaryEvent id="BoundaryEvent_0i3q236" attachedToRef="Task_BBInputSetup"> + <bpmn:outgoing>SequenceFlow_0yeaaxu</bpmn:outgoing> + <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> + </bpmn:boundaryEvent> + <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution)}"> + <bpmn:incoming>SequenceFlow_0yeaaxu</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1b5op07</bpmn:incoming> + <bpmn:incoming>SequenceFlow_030qtgc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="ErrorEnd2" name="end"> + <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming> + </bpmn:endEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y"> + <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer"> + <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing> + <bpmn:timerEventDefinition> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:intermediateCatchEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?"> + <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:endEvent id="EndEvent_1sez2lh" name="end"> + <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}"> + <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="ErrorEnd2" /> + <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" /> + <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" /> + <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" /> + <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" /> + <bpmn:sequenceFlow id="SequenceFlow_0yeaaxu" sourceRef="BoundaryEvent_0i3q236" targetRef="Task_QueryRainyDayTable" /> + <bpmn:sequenceFlow id="SequenceFlow_1b5op07" sourceRef="BoundaryEvent_0c2v381" targetRef="Task_QueryRainyDayTable" /> + <bpmn:sequenceFlow id="SequenceFlow_030qtgc" sourceRef="BoundaryEvent_1jzujri" targetRef="Task_QueryRainyDayTable" /> + <bpmn:boundaryEvent id="BoundaryEvent_1jzujri" attachedToRef="Call_BBToExecute"> + <bpmn:outgoing>SequenceFlow_030qtgc</bpmn:outgoing> + <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> + </bpmn:boundaryEvent> + <bpmn:boundaryEvent id="BoundaryEvent_0c2v381" attachedToRef="StatusPolicy"> + <bpmn:outgoing>SequenceFlow_1b5op07</bpmn:outgoing> + <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> + </bpmn:boundaryEvent> + </bpmn:process> + <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" /> + <bpmn:error id="Error_17zcdbk" name="Bpmn Error" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock"> + <dc:Bounds x="-46" y="162" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-39" y="198" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute"> + <dc:Bounds x="501" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r"> + <di:waypoint xsi:type="dc:Point" x="-10" y="180" /> + <di:waypoint xsi:type="dc:Point" x="53" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-23.5" y="165" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq"> + <di:waypoint xsi:type="dc:Point" x="153" y="180" /> + <di:waypoint xsi:type="dc:Point" x="219" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="141" y="165" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup"> + <dc:Bounds x="53" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock"> + <dc:Bounds x="668" y="162" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="677" y="202" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz"> + <di:waypoint xsi:type="dc:Point" x="601" y="180" /> + <di:waypoint xsi:type="dc:Point" x="668" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="589.5" y="159" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true"> + <dc:Bounds x="392" y="493" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="386" y="468" width="63" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer"> + <dc:Bounds x="655" y="500" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="475" width="55" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true"> + <dc:Bounds x="264" y="493" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="236" y="456" width="70" height="25" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0"> + <di:waypoint xsi:type="dc:Point" x="442" y="518" /> + <di:waypoint xsi:type="dc:Point" x="507" y="518" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="458" y="493" width="18" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva"> + <di:waypoint xsi:type="dc:Point" x="314" y="518" /> + <di:waypoint xsi:type="dc:Point" x="392" y="518" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="339" y="526" width="27" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y"> + <di:waypoint xsi:type="dc:Point" x="289" y="543" /> + <di:waypoint xsi:type="dc:Point" x="289" y="617" /> + <di:waypoint xsi:type="dc:Point" x="475" y="617" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="323" y="624" width="85" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0svi3iy_di" bpmnElement="ErrorEnd2"> + <dc:Bounds x="475" y="599" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="484" y="639" width="19" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable"> + <dc:Bounds x="80" y="478" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1sez2lh_di" bpmnElement="EndEvent_1sez2lh"> + <dc:Bounds x="733" y="500" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="742" y="540" width="19" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1db2c7t_di" bpmnElement="SequenceFlow_1db2c7t"> + <di:waypoint xsi:type="dc:Point" x="417" y="543" /> + <di:waypoint xsi:type="dc:Point" x="417" y="574" /> + <di:waypoint xsi:type="dc:Point" x="493" y="574" /> + <di:waypoint xsi:type="dc:Point" x="493" y="599" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="449" y="553" width="13" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft"> + <di:waypoint xsi:type="dc:Point" x="607" y="518" /> + <di:waypoint xsi:type="dc:Point" x="655" y="518" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="586" y="497" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc"> + <di:waypoint xsi:type="dc:Point" x="691" y="518" /> + <di:waypoint xsi:type="dc:Point" x="733" y="518" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="667" y="497" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer"> + <dc:Bounds x="507" y="478" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue"> + <di:waypoint xsi:type="dc:Point" x="420" y="180" /> + <di:waypoint xsi:type="dc:Point" x="501" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="439.6328125" y="159" width="43" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy"> + <dc:Bounds x="219" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ryv9sh_di" bpmnElement="SequenceFlow_1ryv9sh"> + <di:waypoint xsi:type="dc:Point" x="395" y="155" /> + <di:waypoint xsi:type="dc:Point" x="395" y="75" /> + <di:waypoint xsi:type="dc:Point" x="686" y="75" /> + <di:waypoint xsi:type="dc:Point" x="686" y="162" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="506.4229651162791" y="54" width="69" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true"> + <dc:Bounds x="370" y="155" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="354" y="209" width="87" height="48" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25"> + <di:waypoint xsi:type="dc:Point" x="319" y="180" /> + <di:waypoint xsi:type="dc:Point" x="370" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="344.5" y="159" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="BoundaryEvent_1xzskt3_di" bpmnElement="BoundaryEvent_0i3q236"> + <dc:Bounds x="135" y="202" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="153" y="241" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c"> + <di:waypoint xsi:type="dc:Point" x="180" y="518" /> + <di:waypoint xsi:type="dc:Point" x="264" y="518" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="222" y="496" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0yeaaxu_di" bpmnElement="SequenceFlow_0yeaaxu"> + <di:waypoint xsi:type="dc:Point" x="153" y="238" /> + <di:waypoint xsi:type="dc:Point" x="153" y="302" /> + <di:waypoint xsi:type="dc:Point" x="130" y="302" /> + <di:waypoint xsi:type="dc:Point" x="130" y="478" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="141.5" y="280.5" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1b5op07_di" bpmnElement="SequenceFlow_1b5op07"> + <di:waypoint xsi:type="dc:Point" x="235" y="226" /> + <di:waypoint xsi:type="dc:Point" x="190" y="331" /> + <di:waypoint xsi:type="dc:Point" x="166" y="473" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="212.5" y="257" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_030qtgc_di" bpmnElement="SequenceFlow_030qtgc"> + <di:waypoint xsi:type="dc:Point" x="504" y="231" /> + <di:waypoint xsi:type="dc:Point" x="334" y="373" /> + <di:waypoint xsi:type="dc:Point" x="177" y="485" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="419" y="280.5" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="BoundaryEvent_0k0rmt1_di" bpmnElement="BoundaryEvent_1jzujri"> + <dc:Bounds x="499" y="202" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="517" y="241" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="BoundaryEvent_1pw6a23_di" bpmnElement="BoundaryEvent_0c2v381"> + <dc:Bounds x="233" y="202" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="251" y="241" width="0" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/SDNOVnfHealthCheckBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/SDNOVnfHealthCheckBB.bpmn new file mode 100644 index 0000000000..8cc682ce7f --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/SDNOVnfHealthCheckBB.bpmn @@ -0,0 +1,51 @@ +<?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.8.2"> + <bpmn:process id="SDNOVnfHealthCheckBB" name="SDNOVnfHealthCheckBB" isExecutable="true"> + <bpmn:startEvent id="Start_SDNOHealthCheckBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_SDNOHealthCheckBB" name="end"> + <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_SDNOHealthCheck" name="SDNO Health Check" camunda:expression="${SDNOHealthCheckTasks.sdnoHealthCheck(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_SDNOHealthCheckBB" targetRef="Task_SDNOHealthCheck" /> + <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_SDNOHealthCheck" targetRef="End_SDNOHealthCheckBB" /> + </bpmn:process> + <bpmn:error id="Error_0rgauy1" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="SDNOVnfHealthCheckBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_SDNOHealthCheckBB"> + <dc:Bounds x="104" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="111" y="112" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_SDNOHealthCheckBB"> + <dc:Bounds x="320" y="76" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="329" y="116" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_SDNOHealthCheck"> + <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/BuildingBlock/UnassignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn new file mode 100644 index 0000000000..bd6b124175 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn @@ -0,0 +1,95 @@ +<?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.8.2"> + <bpmn:process id="UnassignNetwork1802BB" name="UnassignNetwork1802BB" isExecutable="true"> + <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> + <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_GetL3NetworkById" /> + <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="End_UnassignNetworkBB" /> + <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> + <bpmn:incoming>SequenceFlow_1gd5h4c</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> + <bpmn:sequenceFlow id="SequenceFlow_1gd5h4c" sourceRef="Task_GetL3NetworkById" targetRef="Task_VfModuleRelatioship" /> + <bpmn:serviceTask id="Task_GetL3NetworkById" name="Get L3Network by networkId (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1gd5h4c</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> + <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0le4vrj</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetwork1802BB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> + <dc:Bounds x="145" y="119" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="152" y="155" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> + <dc:Bounds x="665" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_UnassignNetworkBB"> + <dc:Bounds x="817" y="119" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="826" y="159" width="18" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> + <di:waypoint xsi:type="dc:Point" x="181" y="137" /> + <di:waypoint xsi:type="dc:Point" x="232" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="207" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> + <di:waypoint xsi:type="dc:Point" x="765" y="137" /> + <di:waypoint xsi:type="dc:Point" x="817" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="791" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_194x6el_di" bpmnElement="Task_VfModuleRelatioship"> + <dc:Bounds x="375" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mxe1a7_di" bpmnElement="SequenceFlow_0mxe1a7"> + <di:waypoint xsi:type="dc:Point" x="475" y="137" /> + <di:waypoint xsi:type="dc:Point" x="524" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="500" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1gd5h4c_di" bpmnElement="SequenceFlow_1gd5h4c"> + <di:waypoint xsi:type="dc:Point" x="332" y="137" /> + <di:waypoint xsi:type="dc:Point" x="375" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="354" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1scptd7_di" bpmnElement="Task_GetL3NetworkById"> + <dc:Bounds x="232" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> + <di:waypoint xsi:type="dc:Point" x="624" y="137" /> + <di:waypoint xsi:type="dc:Point" x="665" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1ev9w69_di" bpmnElement="Task_GetCloudRegionVersion"> + <dc:Bounds x="524" y="97" 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/UnassignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn new file mode 100644 index 0000000000..208e41f174 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn @@ -0,0 +1,110 @@ +<?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.8.2"> + <bpmn:process id="UnassignNetworkBB" name="UnassignNetworkBB" isExecutable="true"> + <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> + <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> + <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_GetL3NetworkById" /> + <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="Task_DeleteNetwork" /> + <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_DeleteNetwork" targetRef="End_UnassignNetworkBB" /> + <bpmn:serviceTask id="Task_DeleteNetwork" name="Delete Network (AAI)" camunda:expression="${AAIDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> + <bpmn:incoming>SequenceFlow_1gd5h4c</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> + <bpmn:sequenceFlow id="SequenceFlow_1gd5h4c" sourceRef="Task_GetL3NetworkById" targetRef="Task_VfModuleRelatioship" /> + <bpmn:serviceTask id="Task_GetL3NetworkById" name="Get L3Network by networkId (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1gd5h4c</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> + <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0le4vrj</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetworkBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> + <dc:Bounds x="145" y="119" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="152" y="155" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> + <dc:Bounds x="665" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_UnassignNetworkBB"> + <dc:Bounds x="946" y="119" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="955" y="159" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> + <di:waypoint xsi:type="dc:Point" x="181" y="137" /> + <di:waypoint xsi:type="dc:Point" x="232" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="207" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> + <di:waypoint xsi:type="dc:Point" x="765" y="137" /> + <di:waypoint xsi:type="dc:Point" x="804" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="785" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0csh9dc_di" bpmnElement="SequenceFlow_0csh9dc"> + <di:waypoint xsi:type="dc:Point" x="904" y="137" /> + <di:waypoint xsi:type="dc:Point" x="946" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="925" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0s6d1be_di" bpmnElement="Task_DeleteNetwork"> + <dc:Bounds x="804" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_194x6el_di" bpmnElement="Task_VfModuleRelatioship"> + <dc:Bounds x="375" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mxe1a7_di" bpmnElement="SequenceFlow_0mxe1a7"> + <di:waypoint xsi:type="dc:Point" x="475" y="137" /> + <di:waypoint xsi:type="dc:Point" x="524" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="500" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1gd5h4c_di" bpmnElement="SequenceFlow_1gd5h4c"> + <di:waypoint xsi:type="dc:Point" x="332" y="137" /> + <di:waypoint xsi:type="dc:Point" x="375" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="354" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1scptd7_di" bpmnElement="Task_GetL3NetworkById"> + <dc:Bounds x="232" y="97" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> + <di:waypoint xsi:type="dc:Point" x="624" y="137" /> + <di:waypoint xsi:type="dc:Point" x="665" y="137" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="122" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1ev9w69_di" bpmnElement="Task_GetCloudRegionVersion"> + <dc:Bounds x="524" y="97" 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/UnassignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn new file mode 100644 index 0000000000..235c7c9eac --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn @@ -0,0 +1,67 @@ +<?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.8.2"> + <bpmn:process id="UnassignServiceInstanceBB" name="UnassignServiceInstanceBB" isExecutable="true"> + <bpmn:startEvent id="Start_UnassignServiceInstanceBB" name="start"> + <bpmn:outgoing>SequenceFlow_0fzrhkc</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="Task_AAIDeleteServiceInstance" name="Delete Service Instance (AAI)" camunda:expression="${AAIDeleteTasks.deleteServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0pu9j6i</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0sfeg65</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0sfeg65" sourceRef="Task_AAIDeleteServiceInstance" targetRef="End_UnassignServiceInstanceBB" /> + <bpmn:serviceTask id="Task_SdncUnassignServiceInstance" name="Unassign Service Instance (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0fzrhkc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0pu9j6i</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0pu9j6i" sourceRef="Task_SdncUnassignServiceInstance" targetRef="Task_AAIDeleteServiceInstance" /> + <bpmn:endEvent id="End_UnassignServiceInstanceBB" name="end"> + <bpmn:incoming>SequenceFlow_0sfeg65</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0fzrhkc" sourceRef="Start_UnassignServiceInstanceBB" targetRef="Task_SdncUnassignServiceInstance" /> + </bpmn:process> + <bpmn:error id="Error_041z84w" name="gDelegateError" errorCode="7000" /> + <bpmn:error id="Error_027m7l6" name="Failed orchestration status verification" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignServiceInstanceBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignServiceInstanceBB"> + <dc:Bounds x="474" y="213" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="482" y="256" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0ltb3dj_di" bpmnElement="Task_AAIDeleteServiceInstance"> + <dc:Bounds x="708" y="191" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0sfeg65_di" bpmnElement="SequenceFlow_0sfeg65"> + <di:waypoint xsi:type="dc:Point" x="808" y="231" /> + <di:waypoint xsi:type="dc:Point" x="853" y="231" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="785.5" y="210" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_11klnmn_di" bpmnElement="Task_SdncUnassignServiceInstance"> + <dc:Bounds x="563" y="191" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0pu9j6i_di" bpmnElement="SequenceFlow_0pu9j6i"> + <di:waypoint xsi:type="dc:Point" x="663" y="231" /> + <di:waypoint xsi:type="dc:Point" x="708" y="231" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="640.5" y="210" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1p34ka9_di" bpmnElement="End_UnassignServiceInstanceBB"> + <dc:Bounds x="853" y="213" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="863" y="255" width="21" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0fzrhkc_di" bpmnElement="SequenceFlow_0fzrhkc"> + <di:waypoint xsi:type="dc:Point" x="510" y="231" /> + <di:waypoint xsi:type="dc:Point" x="563" y="231" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="536.5" y="210" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn new file mode 100644 index 0000000000..2b9edbc3d5 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn @@ -0,0 +1,65 @@ +<?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.8.2"> + <bpmn:process id="UnassignVfModuleBB" name="UnassignVfModuleBB" isExecutable="true"> + <bpmn:startEvent id="UnassignVfModuleBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="DeleteVfModule" name="Delete VF Module (AAI)" camunda:expression="${AAIDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1p2r4og</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="UnassignVfModule" name="Unassign VF Module (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1p2r4og</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="UnassignVfModuleBB_End" name="End"> + <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVfModuleBB_Start" targetRef="UnassignVfModule" /> + <bpmn:sequenceFlow id="SequenceFlow_1p2r4og" sourceRef="UnassignVfModule" targetRef="DeleteVfModule" /> + <bpmn:sequenceFlow id="SequenceFlow_0qa6sxx" sourceRef="DeleteVfModule" targetRef="UnassignVfModuleBB_End" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignVfModuleBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVfModuleBB_Start"> + <dc:Bounds x="213" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="219" y="33" width="23" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVfModule"> + <dc:Bounds x="571" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="UnassignVfModule"> + <dc:Bounds x="367" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVfModuleBB_End"> + <dc:Bounds x="782" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="790" y="37" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> + <di:waypoint xsi:type="dc:Point" x="249" y="15" /> + <di:waypoint xsi:type="dc:Point" x="367" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="308" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1p2r4og_di" bpmnElement="SequenceFlow_1p2r4og"> + <di:waypoint xsi:type="dc:Point" x="467" y="15" /> + <di:waypoint xsi:type="dc:Point" x="571" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="519" y="-10" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0qa6sxx_di" bpmnElement="SequenceFlow_0qa6sxx"> + <di:waypoint xsi:type="dc:Point" x="671" y="15" /> + <di:waypoint xsi:type="dc:Point" x="782" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="727" y="0" 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/BuildingBlock/UnassignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn new file mode 100644 index 0000000000..83ba0a9155 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn @@ -0,0 +1,80 @@ +<?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.10.0"> + <bpmn:process id="UnassignVnfBB" name="UnassignVnfBB" isExecutable="true"> + <bpmn:startEvent id="UnassignVnfBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="DeleteVnf" name="Delete Vnf (AAI)" camunda:expression="${AAIDeleteTasks.deleteVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0w3s09a</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="UnassignVnf" name="Unassign Vnf (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_02st1i1</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="UnassignVnfBB_End" name="End"> + <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVnfBB_Start" targetRef="UnassignVnf" /> + <bpmn:sequenceFlow id="SequenceFlow_0qa6sxx" sourceRef="DeleteVnf" targetRef="UnassignVnfBB_End" /> + <bpmn:serviceTask id="DeleteVnfInstanceGroups" name="Delete Vnf Instance Groups (AAI)" camunda:expression="${UnassignVnf.deleteInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_02st1i1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0w3s09a</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_02st1i1" sourceRef="UnassignVnf" targetRef="DeleteVnfInstanceGroups" /> + <bpmn:sequenceFlow id="SequenceFlow_0w3s09a" sourceRef="DeleteVnfInstanceGroups" targetRef="DeleteVnf" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignVnfBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVnfBB_Start"> + <dc:Bounds x="213" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="218" y="33" width="25" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVnf"> + <dc:Bounds x="723" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="UnassignVnf"> + <dc:Bounds x="367" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVnfBB_End"> + <dc:Bounds x="959" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="967" y="37" width="20" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> + <di:waypoint xsi:type="dc:Point" x="249" y="15" /> + <di:waypoint xsi:type="dc:Point" x="367" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="308" y="0" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0qa6sxx_di" bpmnElement="SequenceFlow_0qa6sxx"> + <di:waypoint xsi:type="dc:Point" x="823" y="15" /> + <di:waypoint xsi:type="dc:Point" x="959" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="846" y="0" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0b1276e_di" bpmnElement="DeleteVnfInstanceGroups"> + <dc:Bounds x="546" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_02st1i1_di" bpmnElement="SequenceFlow_02st1i1"> + <di:waypoint xsi:type="dc:Point" x="467" y="15" /> + <di:waypoint xsi:type="dc:Point" x="546" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="506.5" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0w3s09a_di" bpmnElement="SequenceFlow_0w3s09a"> + <di:waypoint xsi:type="dc:Point" x="646" y="15" /> + <di:waypoint xsi:type="dc:Point" x="723" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="684.5" y="-6" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn new file mode 100644 index 0000000000..12af246153 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn @@ -0,0 +1,52 @@ +<?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.8.2"> + <bpmn:process id="UnassignVolumeGroupBB" name="UnassignVolumeGroupBB" isExecutable="true"> + <bpmn:startEvent id="UnassignVolumeGroupBB_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="UnassignVolumeGroup" name="Delete VolumeGroup (AAI)" camunda:expression="${AAIDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="UnassignVolumeGroupBB_End" name="End"> + <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVolumeGroupBB_Start" targetRef="UnassignVolumeGroup" /> + <bpmn:sequenceFlow id="SequenceFlow_0qa6sxx" sourceRef="UnassignVolumeGroup" targetRef="UnassignVolumeGroupBB_End" /> + </bpmn:process> + <bpmn:error id="Error_1v1005f" name="gDelegateError" errorCode="7000" /> + <bpmn:error id="Error_0pjeg2m" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignVolumeGroupBB"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVolumeGroupBB_Start"> + <dc:Bounds x="213" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="218" y="33" width="25" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="UnassignVolumeGroup"> + <dc:Bounds x="459" y="-25" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVolumeGroupBB_End"> + <dc:Bounds x="782" y="-3" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="790" y="37" width="20" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> + <di:waypoint xsi:type="dc:Point" x="249" y="15" /> + <di:waypoint xsi:type="dc:Point" x="459" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="309" y="0" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0qa6sxx_di" bpmnElement="SequenceFlow_0qa6sxx"> + <di:waypoint xsi:type="dc:Point" x="559" y="15" /> + <di:waypoint xsi:type="dc:Point" x="782" y="15" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="625.5" y="0" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn new file mode 100644 index 0000000000..9f431212b1 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn @@ -0,0 +1,232 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" 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"> + <bpmn2:process id="UpdateNetworkBB" name="UpdateNetworkBB" isExecutable="true"> + <bpmn2:startEvent id="UpdateNetworkBB_Start" name="Start"> + <bpmn2:outgoing>SequenceFlow_074w2et</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:serviceTask id="SDNCChangeAssignNetwork" name="SDNC ChangeAssign Network" camunda:expression="${SDNCChangeAssignTasks.changeAssignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_074w2et</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_04yezm3</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_074w2et" sourceRef="UpdateNetworkBB_Start" targetRef="SDNCChangeAssignNetwork" /> + <bpmn2:intermediateThrowEvent id="SDNC_End" name="To AAI"> + <bpmn2:incoming>SequenceFlow_04yezm3</bpmn2:incoming> + <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:sequenceFlow id="SequenceFlow_04yezm3" sourceRef="SDNCChangeAssignNetwork" targetRef="SDNC_End" /> + <bpmn2:serviceTask id="QueryNetworkAAI" name="Re-Query Network (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1trqq6d</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_03janqs</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:intermediateCatchEvent id="AAI_Start" name="To AAI"> + <bpmn2:outgoing>SequenceFlow_1trqq6d</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1trqq6d" sourceRef="AAI_Start" targetRef="QueryNetworkAAI" /> + <bpmn2:serviceTask id="QueryVpnBindingAAI" name="Query Vpn Binding (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_03janqs</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1io4cl7</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_03janqs" sourceRef="QueryNetworkAAI" targetRef="QueryVpnBindingAAI" /> + <bpmn2:serviceTask id="QueryNetworkPolicyAAI" name="Query Network Policy (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_1io4cl7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_16fm47t</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_1io4cl7" sourceRef="QueryVpnBindingAAI" targetRef="QueryNetworkPolicyAAI" /> + <bpmn2:sequenceFlow id="SequenceFlow_16fm47t" sourceRef="QueryNetworkPolicyAAI" targetRef="QueryNetworkTableRefAAI" /> + <bpmn2:serviceTask id="QueryNetworkTableRefAAI" name="Query Network TableRef (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_16fm47t</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00xbxe7</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:intermediateThrowEvent id="AAI_End" name="To AIC"> + <bpmn2:incoming>SequenceFlow_00xbxe7</bpmn2:incoming> + <bpmn2:linkEventDefinition name="AAI_to_AIC" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:sequenceFlow id="SequenceFlow_00xbxe7" sourceRef="QueryNetworkTableRefAAI" targetRef="AAI_End" /> + <bpmn2:intermediateCatchEvent id="AIC_Start" name="To AIC"> + <bpmn2:outgoing>SequenceFlow_196cgux</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="AAI_to_AIC" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:sequenceFlow id="SequenceFlow_196cgux" sourceRef="AIC_Start" targetRef="UpdateNetworkAdapter" /> + <bpmn2:serviceTask id="UpdateNetworkAdapter" name="Update Network (Network Adapter)" camunda:expression="${NetworkAdapterUpdateTasks.updateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_196cgux</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0hsvgje</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:sequenceFlow id="SequenceFlow_0hsvgje" sourceRef="UpdateNetworkAdapter" targetRef="UpdateNetworkAAI" /> + <bpmn2:serviceTask id="UpdateNetworkAAI" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateObjectNetwork(execution.getVariable(""))}"> + <bpmn2:incoming>SequenceFlow_0hsvgje</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0fhfitm</bpmn2:outgoing> + </bpmn2:serviceTask> + <bpmn2:endEvent id="UpdateNetworkBB_End" name="End"> + <bpmn2:incoming>SequenceFlow_0fhfitm</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0fhfitm" sourceRef="UpdateNetworkAAI" targetRef="UpdateNetworkBB_End" /> + <bpmn2:subProcess id="SubProcess_1srp3f9" triggeredByEvent="true"> + <bpmn2:startEvent id="Error_start" name="Start"> + <bpmn2:outgoing>SequenceFlow_1vfwv05</bpmn2:outgoing> + <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" camunda:errorCodeVariable="gBBErrorCode" camunda:errorMessageVariable="gBBErrorMessage" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="Error_end" name="End"> + <bpmn2:incoming>SequenceFlow_1vfwv05</bpmn2:incoming> + <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1vfwv05" sourceRef="Error_start" targetRef="Error_end" /> + </bpmn2:subProcess> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmn2:error id="Error_01yvdm8" name="gDelegateError" errorCode="7000" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UpdateNetworkBB"> + <bpmndi:BPMNShape id="StartEvent_1kewmmc_di" bpmnElement="UpdateNetworkBB_Start"> + <dc:Bounds x="144" y="77" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="150" y="117" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_12470s8_di" bpmnElement="SDNCChangeAssignNetwork"> + <dc:Bounds x="278" y="55" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_074w2et_di" bpmnElement="SequenceFlow_074w2et"> + <di:waypoint xsi:type="dc:Point" x="180" y="95" /> + <di:waypoint xsi:type="dc:Point" x="278" y="95" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="229" y="74" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0pce3rm_di" bpmnElement="SDNC_End"> + <dc:Bounds x="487" y="77" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="490" y="117" width="33" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_04yezm3_di" bpmnElement="SequenceFlow_04yezm3"> + <di:waypoint xsi:type="dc:Point" x="378" y="95" /> + <di:waypoint xsi:type="dc:Point" x="487" y="95" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="432.5" y="74" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0d05e4a_di" bpmnElement="QueryNetworkAAI"> + <dc:Bounds x="104" y="193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_1hbb3j8_di" bpmnElement="AAI_Start"> + <dc:Bounds x="-1" y="215" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="2" y="255" width="33" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1trqq6d_di" bpmnElement="SequenceFlow_1trqq6d"> + <di:waypoint xsi:type="dc:Point" x="35" y="233" /> + <di:waypoint xsi:type="dc:Point" x="104" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="69.5" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_09dctlw_di" bpmnElement="QueryVpnBindingAAI"> + <dc:Bounds x="280" y="193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_03janqs_di" bpmnElement="SequenceFlow_03janqs"> + <di:waypoint xsi:type="dc:Point" x="204" y="233" /> + <di:waypoint xsi:type="dc:Point" x="280" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="242" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1slp95d_di" bpmnElement="QueryNetworkPolicyAAI"> + <dc:Bounds x="455" y="193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1io4cl7_di" bpmnElement="SequenceFlow_1io4cl7"> + <di:waypoint xsi:type="dc:Point" x="380" y="233" /> + <di:waypoint xsi:type="dc:Point" x="455" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="417.5" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_16fm47t_di" bpmnElement="SequenceFlow_16fm47t"> + <di:waypoint xsi:type="dc:Point" x="555" y="233" /> + <di:waypoint xsi:type="dc:Point" x="625" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="590" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0e0nlcc_di" bpmnElement="QueryNetworkTableRefAAI"> + <dc:Bounds x="625" y="193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0x5f0zk_di" bpmnElement="AAI_End"> + <dc:Bounds x="785" y="215" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="787" y="255" width="34" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_00xbxe7_di" bpmnElement="SequenceFlow_00xbxe7"> + <di:waypoint xsi:type="dc:Point" x="725" y="233" /> + <di:waypoint xsi:type="dc:Point" x="785" y="233" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="755" y="212" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_0sx0nb6_di" bpmnElement="AIC_Start"> + <dc:Bounds x="-1" y="332" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1" y="372" width="34" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_196cgux_di" bpmnElement="SequenceFlow_196cgux"> + <di:waypoint xsi:type="dc:Point" x="35" y="350" /> + <di:waypoint xsi:type="dc:Point" x="104" y="350" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="69.5" y="329" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0i66n9g_di" bpmnElement="UpdateNetworkAdapter"> + <dc:Bounds x="104" y="310" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0hsvgje_di" bpmnElement="SequenceFlow_0hsvgje"> + <di:waypoint xsi:type="dc:Point" x="204" y="350" /> + <di:waypoint xsi:type="dc:Point" x="278" y="350" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="241" y="329" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1ydm5u9_di" bpmnElement="UpdateNetworkAAI"> + <dc:Bounds x="278" y="310" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0fsts2w_di" bpmnElement="UpdateNetworkBB_End"> + <dc:Bounds x="493" y="332" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="502" y="372" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0fhfitm_di" bpmnElement="SequenceFlow_0fhfitm"> + <di:waypoint xsi:type="dc:Point" x="378" y="350" /> + <di:waypoint xsi:type="dc:Point" x="493" y="350" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="435.5" y="329" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_11x1b8w_di" bpmnElement="SubProcess_1srp3f9" isExpanded="true"> + <dc:Bounds x="115" y="516" width="350" height="200" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1uqy6gg_di" bpmnElement="Error_start"> + <dc:Bounds x="194" y="592" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="200" y="632" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0oe6ngb_di" bpmnElement="Error_end"> + <dc:Bounds x="358" y="592" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="367" y="632" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1vfwv05_di" bpmnElement="SequenceFlow_1vfwv05"> + <di:waypoint xsi:type="dc:Point" x="230" y="610" /> + <di:waypoint xsi:type="dc:Point" x="358" y="610" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="294" y="589" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn new file mode 100644 index 0000000000..04f3684ee4 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn @@ -0,0 +1,122 @@ +<?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.10.0"> + <bpmn:process id="VnfAdapter" name="Vnf Adapter" isExecutable="true"> + <bpmn:startEvent id="VnfAdapter_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:subProcess id="VnfAdapter_Error" name="Sub Process Error" triggeredByEvent="true"> + <bpmn:endEvent id="Error_End" name="End"> + <bpmn:incoming>SequenceFlow_1abat8l</bpmn:incoming> + </bpmn:endEvent> + <bpmn:startEvent id="Error_Start" name="Start"> + <bpmn:outgoing>SequenceFlow_1abat8l</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_1abat8l" sourceRef="Error_Start" targetRef="Error_End" /> + </bpmn:subProcess> + <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="VnfAdapter_Start" targetRef="PreProcessRequest" /> + <bpmn:endEvent id="VnfAdapter_End" name="End"> + <bpmn:incoming>SequenceFlow_1ivhukd</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="PreProcessRequest" name="Pre Process Request" camunda:expression="${VnfAdapterImpl.preProcessVnfAdapter(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0qaaf5k</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="PostProcessResponse" name="Post Process Response" camunda:expression="${VnfAdapterImpl.postProcessVnfAdapter(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0j1zvis</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ivhukd</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1ivhukd" sourceRef="PostProcessResponse" targetRef="VnfAdapter_End" /> + <bpmn:callActivity id="Call_vnfAdapterRestV1" name="Call vnfAdapterRestV1" calledElement="vnfAdapterRestV1"> + <bpmn:extensionElements> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="VNFREST_Request" target="vnfAdapterRestV1Request" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="vnfAdapterRestV1Response" target="vnfAdapterRestV1Response" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0qaaf5k</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0j1zvis</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_0qaaf5k" sourceRef="PreProcessRequest" targetRef="Call_vnfAdapterRestV1" /> + <bpmn:sequenceFlow id="SequenceFlow_0j1zvis" sourceRef="Call_vnfAdapterRestV1" targetRef="PostProcessResponse" /> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VnfAdapter"> + <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="VnfAdapter_Start"> + <dc:Bounds x="213" y="357" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="219" y="393" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_17szae7_di" bpmnElement="VnfAdapter_Error" isExpanded="true"> + <dc:Bounds x="453" y="529" width="233" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> + <di:waypoint xsi:type="dc:Point" x="249" y="375" /> + <di:waypoint xsi:type="dc:Point" x="329" y="375" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="244" y="360" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_16vfqpk_di" bpmnElement="Error_End"> + <dc:Bounds x="606" y="573" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="615" y="613" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1t3ep1m_di" bpmnElement="Error_Start"> + <dc:Bounds x="491" y="573" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="498" y="613" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1abat8l_di" bpmnElement="SequenceFlow_1abat8l"> + <di:waypoint xsi:type="dc:Point" x="527" y="591" /> + <di:waypoint xsi:type="dc:Point" x="566" y="591" /> + <di:waypoint xsi:type="dc:Point" x="566" y="591" /> + <di:waypoint xsi:type="dc:Point" x="606" y="591" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="536" y="591" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="VnfAdapter_End"> + <dc:Bounds x="894" y="357" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="902" y="397" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1frb5h2_di" bpmnElement="PreProcessRequest"> + <dc:Bounds x="329" y="335" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1yomr79_di" bpmnElement="PostProcessResponse"> + <dc:Bounds x="714" y="335" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ivhukd_di" bpmnElement="SequenceFlow_1ivhukd"> + <di:waypoint xsi:type="dc:Point" x="814" y="375" /> + <di:waypoint xsi:type="dc:Point" x="894" y="375" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="809" y="354" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0n6wnin_di" bpmnElement="Call_vnfAdapterRestV1"> + <dc:Bounds x="520" y="335" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0qaaf5k_di" bpmnElement="SequenceFlow_0qaaf5k"> + <di:waypoint xsi:type="dc:Point" x="429" y="375" /> + <di:waypoint xsi:type="dc:Point" x="520" y="375" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="429.5" y="354" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0j1zvis_di" bpmnElement="SequenceFlow_0j1zvis"> + <di:waypoint xsi:type="dc:Point" x="620" y="375" /> + <di:waypoint xsi:type="dc:Point" x="714" y="375" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="622" y="354" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn new file mode 100644 index 0000000000..6544387775 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn @@ -0,0 +1,550 @@ +<?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.7.2"> + <bpmn:process id="WorkflowActionBB" name="WorkflowActionBB" isExecutable="true"> + <bpmn:startEvent id="Start_WorkflowActionBB" name="start"> + <bpmn:outgoing>SequenceFlow_15s0okp</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="End_WorkflowActionBB" name="end"> + <bpmn:incoming>SequenceFlow_1rscv7d</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0x4urgp</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_15s0okp" sourceRef="Start_WorkflowActionBB" targetRef="Task_RetrieveBBExectuionList" /> + <bpmn:callActivity id="Call_ExecuteBB" name="Execute BB" camunda:asyncBefore="true" calledElement="ExecuteBuildingBlock"> + <bpmn:extensionElements> + <camunda:in source="buildingBlock" target="buildingBlock" /> + <camunda:out source="buildingBlock" target="buildingBlock" /> + <camunda:out source="handlingCode" target="handlingCode" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="retryCount" target="retryCount" /> + <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0mqrkxv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07h9d4y</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_0mqrkxv" sourceRef="Task_SelectBB" targetRef="Call_ExecuteBB" /> + <bpmn:serviceTask id="Task_SelectBB" name="Select BB" camunda:expression="${WorkflowActionBBTasks.selectBB(execution)}"> + <bpmn:incoming>SequenceFlow_1atzsgn</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1wb59ic</bpmn:incoming> + <bpmn:incoming>SequenceFlow_005hi8o</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0unbew4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mqrkxv</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_Finished" default="SequenceFlow_01j184u"> + <bpmn:incoming>SequenceFlow_07h9d4y</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1m2eezj</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0v588sm</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_11530ei</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_01j184u</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0l7kaba</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_07h9d4y" sourceRef="Call_ExecuteBB" targetRef="ExclusiveGateway_Finished" /> + <bpmn:sequenceFlow id="SequenceFlow_1m2eezj" name="Completed = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowC"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("handlingCode")=="Success"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:serviceTask id="Task_RetrieveBBExectuionList" name="Retrieve BB Execution List" camunda:expression="${WorkflowAction.selectExecutionList(execution)}"> + <bpmn:incoming>SequenceFlow_15s0okp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0vc9go9</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_SendSync" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendSyncAck(execution)}"> + <bpmn:incoming>SequenceFlow_0sckerv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wb59ic</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Task_SetupCompleteMsoProcess" name="Setup Complete MSO Process" camunda:expression="${WorkflowActionBBTasks.setupCompleteMsoProcess(execution)}"> + <bpmn:incoming>SequenceFlow_0kf5sen</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1pz6edz</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:callActivity id="Call_CompleteMsoProcess" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> + <bpmn:extensionElements> + <camunda:in source="CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" /> + <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> + <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" /> + <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" /> + <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1pz6edz</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1rscv7d</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1pz6edz" sourceRef="Task_SetupCompleteMsoProcess" targetRef="Call_CompleteMsoProcess" /> + <bpmn:sequenceFlow id="SequenceFlow_1rscv7d" sourceRef="Call_CompleteMsoProcess" targetRef="End_WorkflowActionBB" /> + <bpmn:subProcess id="SubProcess_18226x4" name="Error Handling" triggeredByEvent="true"> + <bpmn:startEvent id="ErrorStart" name="error"> + <bpmn:outgoing>SequenceFlow_1edjl5x</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="ErrorEnd" name="end"> + <bpmn:incoming>SequenceFlow_0wvzfgf</bpmn:incoming> + </bpmn:endEvent> + <bpmn:serviceTask id="Task_UpdateDb" name="Update Request To Failed" camunda:expression="${WorkflowActionBBTasks.updateRequestStatusToFailed(execution)}"> + <bpmn:incoming>SequenceFlow_024g0d1</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0eana0l</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0wvzfgf</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1edjl5x" sourceRef="ErrorStart" targetRef="ExclusiveGateway_10q79b6" /> + <bpmn:sequenceFlow id="SequenceFlow_0wvzfgf" sourceRef="Task_UpdateDb" targetRef="ErrorEnd" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_10q79b6" name="Is Top-Level Flow and Sync Ack not sent?" default="SequenceFlow_024g0d1"> + <bpmn:incoming>SequenceFlow_1edjl5x</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_024g0d1</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0vi883o</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_024g0d1" name="no" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_UpdateDb" /> + <bpmn:sequenceFlow id="SequenceFlow_0vi883o" name="yes" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_SendSyncAckError"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==true&&execution.getVariable("sentSyncResponse")==false}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0eana0l" sourceRef="Task_SendSyncAckError" targetRef="Task_UpdateDb" /> + <bpmn:serviceTask id="Task_SendSyncAckError" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendSyncAck(execution)}"> + <bpmn:incoming>SequenceFlow_0vi883o</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0eana0l</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:subProcess> + <bpmn:sequenceFlow id="SequenceFlow_0v588sm" name="Rollback = true" sourceRef="ExclusiveGateway_Finished" targetRef="Task_RollbackExecutionPath"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Rollback"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1atzsgn" sourceRef="Task_RollbackExecutionPath" targetRef="Task_SelectBB"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==true}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:serviceTask id="Task_RollbackExecutionPath" name="Rollback Execution Path" camunda:expression="${WorkflowActionBBTasks.rollbackExecutionPath(execution)}"> + <bpmn:incoming>SequenceFlow_0v588sm</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1atzsgn</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_11dlyzt</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0vc9go9" sourceRef="Task_RetrieveBBExectuionList" targetRef="ExclusiveGateway_isTopLevelFlow" /> + <bpmn:sequenceFlow id="SequenceFlow_11530ei" name="Abort = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowAbort"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Abort"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:serviceTask id="Task_AbortAndCallErrorHandling" name="Update Request To Failed" camunda:expression="${WorkflowActionBBTasks.updateRequestStatusToFailed(execution)}"> + <bpmn:incoming>SequenceFlow_02ksbt0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1p8yxu6</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="EndEvent_0lzz1ya" name="end"> + <bpmn:incoming>SequenceFlow_1p8yxu6</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1r570x3</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1p8yxu6" sourceRef="Task_AbortAndCallErrorHandling" targetRef="EndEvent_0lzz1ya" /> + <bpmn:sequenceFlow id="SequenceFlow_1wb59ic" sourceRef="Task_SendSync" targetRef="Task_SelectBB" /> + <bpmn:sequenceFlow id="SequenceFlow_01j184u" sourceRef="ExclusiveGateway_Finished" targetRef="Task_0a31dkf" /> + <bpmn:sequenceFlow id="SequenceFlow_005hi8o" sourceRef="Task_0a31dkf" targetRef="Task_SelectBB" /> + <bpmn:serviceTask id="Task_0a31dkf" name="Check Retry Status" camunda:expression="${WorkflowActionBBTasks.checkRetryStatus(execution)}"> + <bpmn:incoming>SequenceFlow_01j184u</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_005hi8o</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlow" name="Is Top-Level Flow?" default="SequenceFlow_0sckerv"> + <bpmn:incoming>SequenceFlow_0vc9go9</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0sckerv</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0unbew4</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0sckerv" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_SendSync" /> + <bpmn:sequenceFlow id="SequenceFlow_0unbew4" name="no" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_SelectBB"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowAbort" name="Is Top-Level Flow?" default="SequenceFlow_02ksbt0"> + <bpmn:incoming>SequenceFlow_11530ei</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_02ksbt0</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1r570x3</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_02ksbt0" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="Task_AbortAndCallErrorHandling" /> + <bpmn:sequenceFlow id="SequenceFlow_1r570x3" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="EndEvent_0lzz1ya"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowC" name="Is Top-Level Flow?" default="SequenceFlow_0kf5sen"> + <bpmn:incoming>SequenceFlow_1m2eezj</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0kf5sen</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0x4urgp</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:sequenceFlow id="SequenceFlow_0kf5sen" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlowC" targetRef="Task_SetupCompleteMsoProcess" /> + <bpmn:sequenceFlow id="SequenceFlow_0x4urgp" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowC" targetRef="End_WorkflowActionBB"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:endEvent id="End_RollbackFailed" name="end"> + <bpmn:incoming>SequenceFlow_1ui67mc</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_11dlyzt" name="Rollback Not Needed" sourceRef="Task_RollbackExecutionPath" targetRef="Task_UpdateRequestToFailed"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==false}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:serviceTask id="Task_UpdateRequestToFailed" name="Update Request To Failed" camunda:expression="${WorkflowActionBBTasks.updateRequestStatusToFailed(execution)}"> + <bpmn:incoming>SequenceFlow_11dlyzt</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0l7kaba</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ui67mc</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0l7kaba" name="Rollback Completed" sourceRef="ExclusiveGateway_Finished" targetRef="Task_UpdateRequestToFailed"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("handlingCode")=="PreformingRollback"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1ui67mc" sourceRef="Task_UpdateRequestToFailed" targetRef="End_RollbackFailed" /> + <bpmn:subProcess id="SubProcess_0fuugr9" name="Java Exception Handling Sub Process" triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_runtimeError" name="error"> + <bpmn:outgoing>SequenceFlow_11d126w</bpmn:outgoing> + <bpmn:errorEventDefinition errorRef="Error_0kd2o2a" camunda:errorCodeVariable="BPMN_javaExpCode" camunda:errorMessageVariable="BPMN_javaExpMsg" /> + </bpmn:startEvent> + <bpmn:serviceTask id="ServiceTask_HandleRuntimeError" name="Handle Runtime Exception" camunda:expression="${WorkflowAction.handleRuntimeException(execution)}"> + <bpmn:incoming>SequenceFlow_11d126w</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0w4sx88</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="EndEvent__runtimeError"> + <bpmn:incoming>SequenceFlow_0w4sx88</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_11d126w" sourceRef="StartEvent_runtimeError" targetRef="ServiceTask_HandleRuntimeError" /> + <bpmn:sequenceFlow id="SequenceFlow_0w4sx88" sourceRef="ServiceTask_HandleRuntimeError" targetRef="EndEvent__runtimeError" /> + </bpmn:subProcess> + </bpmn:process> + <bpmn:error id="Error_0kd2o2a" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="WorkflowActionBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_WorkflowActionBB"> + <dc:Bounds x="-52" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-45" y="138" width="22" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1uv6erv_di" bpmnElement="End_WorkflowActionBB"> + <dc:Bounds x="1281" y="147" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1290" y="186" width="19" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_15s0okp_di" bpmnElement="SequenceFlow_15s0okp"> + <di:waypoint xsi:type="dc:Point" x="-16" y="120" /> + <di:waypoint xsi:type="dc:Point" x="17" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-44.5" y="98.5" width="90" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_03m7z4y_di" bpmnElement="Call_ExecuteBB"> + <dc:Bounds x="560" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mqrkxv_di" bpmnElement="SequenceFlow_0mqrkxv"> + <di:waypoint xsi:type="dc:Point" x="528" y="120" /> + <di:waypoint xsi:type="dc:Point" x="560" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="544" y="99" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1snenqk_di" bpmnElement="Task_SelectBB"> + <dc:Bounds x="428" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0m1zt0q_di" bpmnElement="ExclusiveGateway_Finished" isMarkerVisible="true"> + <dc:Bounds x="692" y="95" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="676" y="42" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_07h9d4y_di" bpmnElement="SequenceFlow_07h9d4y"> + <di:waypoint xsi:type="dc:Point" x="660" y="120" /> + <di:waypoint xsi:type="dc:Point" x="692" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="676" y="99" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1m2eezj_di" bpmnElement="SequenceFlow_1m2eezj"> + <di:waypoint xsi:type="dc:Point" x="730" y="132" /> + <di:waypoint xsi:type="dc:Point" x="761" y="165" /> + <di:waypoint xsi:type="dc:Point" x="841" y="165" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="749" y="168" width="83" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0kn8jt8_di" bpmnElement="Task_RetrieveBBExectuionList"> + <dc:Bounds x="17" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0654g3m_di" bpmnElement="Task_SendSync"> + <dc:Bounds x="235" y="-7" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0wzh11j_di" bpmnElement="Task_SetupCompleteMsoProcess"> + <dc:Bounds x="900" y="210" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1jxi5jq_di" bpmnElement="Call_CompleteMsoProcess"> + <dc:Bounds x="1027" y="210" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1pz6edz_di" bpmnElement="SequenceFlow_1pz6edz"> + <di:waypoint xsi:type="dc:Point" x="1000" y="250" /> + <di:waypoint xsi:type="dc:Point" x="1027" y="250" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1014" y="229" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1rscv7d_di" bpmnElement="SequenceFlow_1rscv7d"> + <di:waypoint xsi:type="dc:Point" x="1127" y="250" /> + <di:waypoint xsi:type="dc:Point" x="1147" y="250" /> + <di:waypoint xsi:type="dc:Point" x="1147" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1281" y="165" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1117" y="207.5" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_18226x4_di" bpmnElement="SubProcess_18226x4" isExpanded="true"> + <dc:Bounds x="498" y="444" width="438" height="297" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_184g7f3_di" bpmnElement="ErrorStart"> + <dc:Bounds x="520" y="639" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="526" y="682" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0l4edvr_di" bpmnElement="ErrorEnd"> + <dc:Bounds x="880" y="639" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="890" y="681" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0v588sm_di" bpmnElement="SequenceFlow_0v588sm"> + <di:waypoint xsi:type="dc:Point" x="717" y="145" /> + <di:waypoint xsi:type="dc:Point" x="717" y="262" /> + <di:waypoint xsi:type="dc:Point" x="528" y="262" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="638.5121951219512" y="272" width="74" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1atzsgn_di" bpmnElement="SequenceFlow_1atzsgn"> + <di:waypoint xsi:type="dc:Point" x="478" y="222" /> + <di:waypoint xsi:type="dc:Point" x="478" y="160" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="448" y="191" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_19t1oyr_di" bpmnElement="Task_RollbackExecutionPath"> + <dc:Bounds x="428" y="222" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0vc9go9_di" bpmnElement="SequenceFlow_0vc9go9"> + <di:waypoint xsi:type="dc:Point" x="117" y="120" /> + <di:waypoint xsi:type="dc:Point" x="150" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="134" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_11530ei_di" bpmnElement="SequenceFlow_11530ei"> + <di:waypoint xsi:type="dc:Point" x="727" y="105" /> + <di:waypoint xsi:type="dc:Point" x="764" y="44" /> + <di:waypoint xsi:type="dc:Point" x="841" y="45" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="756" y="17.269982652857244" width="57" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0jo36ez_di" bpmnElement="Task_AbortAndCallErrorHandling"> + <dc:Bounds x="957" y="-76" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0lzz1ya_di" bpmnElement="EndEvent_0lzz1ya"> + <dc:Bounds x="1167" y="27" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1176" y="67" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1p8yxu6_di" bpmnElement="SequenceFlow_1p8yxu6"> + <di:waypoint xsi:type="dc:Point" x="1057" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="1140" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="1140" y="45" /> + <di:waypoint xsi:type="dc:Point" x="1167" y="45" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1155" y="4.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1wb59ic_di" bpmnElement="SequenceFlow_1wb59ic"> + <di:waypoint xsi:type="dc:Point" x="335" y="33" /> + <di:waypoint xsi:type="dc:Point" x="382" y="33" /> + <di:waypoint xsi:type="dc:Point" x="382" y="120" /> + <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="397" y="76.5" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01j184u_di" bpmnElement="SequenceFlow_01j184u"> + <di:waypoint xsi:type="dc:Point" x="717" y="95" /> + <di:waypoint xsi:type="dc:Point" x="717" y="55" /> + <di:waypoint xsi:type="dc:Point" x="717" y="55" /> + <di:waypoint xsi:type="dc:Point" x="717" y="4" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="732" y="49" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_005hi8o_di" bpmnElement="SequenceFlow_005hi8o"> + <di:waypoint xsi:type="dc:Point" x="667" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="478" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="478" y="80" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="573" y="-57" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1c1v3p1_di" bpmnElement="Task_0a31dkf"> + <dc:Bounds x="667" y="-76" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0ptb1yi_di" bpmnElement="ExclusiveGateway_isTopLevelFlow" isMarkerVisible="true"> + <dc:Bounds x="150" y="95" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="144" y="145" width="61" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0sckerv_di" bpmnElement="SequenceFlow_0sckerv"> + <di:waypoint xsi:type="dc:Point" x="176" y="96" /> + <di:waypoint xsi:type="dc:Point" x="176" y="33" /> + <di:waypoint xsi:type="dc:Point" x="235" y="33" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="182" y="54.5" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0unbew4_di" bpmnElement="SequenceFlow_0unbew4"> + <di:waypoint xsi:type="dc:Point" x="200" y="120" /> + <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="308" y="95" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_001g41v_di" bpmnElement="ExclusiveGateway_isTopLevelFlowAbort" isMarkerVisible="true"> + <dc:Bounds x="841" y="20" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="835" y="70" width="61" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_02ksbt0_di" bpmnElement="SequenceFlow_02ksbt0"> + <di:waypoint xsi:type="dc:Point" x="866" y="20" /> + <di:waypoint xsi:type="dc:Point" x="866" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="957" y="-37" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="872" y="-8.5" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1r570x3_di" bpmnElement="SequenceFlow_1r570x3"> + <di:waypoint xsi:type="dc:Point" x="891" y="45" /> + <di:waypoint xsi:type="dc:Point" x="1167" y="45" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1023" y="20" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1er1kam_di" bpmnElement="ExclusiveGateway_isTopLevelFlowC" isMarkerVisible="true"> + <dc:Bounds x="841" y="140" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="835" y="108" width="61" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0kf5sen_di" bpmnElement="SequenceFlow_0kf5sen"> + <di:waypoint xsi:type="dc:Point" x="866" y="190" /> + <di:waypoint xsi:type="dc:Point" x="866" y="250" /> + <di:waypoint xsi:type="dc:Point" x="900" y="250" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="872" y="220" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0x4urgp_di" bpmnElement="SequenceFlow_0x4urgp"> + <di:waypoint xsi:type="dc:Point" x="891" y="165" /> + <di:waypoint xsi:type="dc:Point" x="1281" y="165" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1080.2065217391305" y="140" width="13" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_1q8eh5e_di" bpmnElement="End_RollbackFailed"> + <dc:Bounds x="940" y="347" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="958" y="399" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11dlyzt_di" bpmnElement="SequenceFlow_11dlyzt"> + <di:waypoint xsi:type="dc:Point" x="478" y="302" /> + <di:waypoint xsi:type="dc:Point" x="478" y="368" /> + <di:waypoint xsi:type="dc:Point" x="741" y="368" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="495" y="324.65" width="62" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1h154rn_di" bpmnElement="Task_UpdateDb"> + <dc:Bounds x="713" y="617" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1t8n9gd_di" bpmnElement="Task_UpdateRequestToFailed"> + <dc:Bounds x="741" y="325" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0l7kaba_di" bpmnElement="SequenceFlow_0l7kaba"> + <di:waypoint xsi:type="dc:Point" x="723" y="139" /> + <di:waypoint xsi:type="dc:Point" x="757" y="252" /> + <di:waypoint xsi:type="dc:Point" x="797" y="252" /> + <di:waypoint xsi:type="dc:Point" x="797" y="325" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="739.7268586738111" y="255.4388401674105" width="52" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1edjl5x_di" bpmnElement="SequenceFlow_1edjl5x"> + <di:waypoint xsi:type="dc:Point" x="556" y="657" /> + <di:waypoint xsi:type="dc:Point" x="602" y="657" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="534" y="636" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0wvzfgf_di" bpmnElement="SequenceFlow_0wvzfgf"> + <di:waypoint xsi:type="dc:Point" x="813" y="657" /> + <di:waypoint xsi:type="dc:Point" x="880" y="657" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="801.5" y="636" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ui67mc_di" bpmnElement="SequenceFlow_1ui67mc"> + <di:waypoint xsi:type="dc:Point" x="841" y="365" /> + <di:waypoint xsi:type="dc:Point" x="915" y="365" /> + <di:waypoint xsi:type="dc:Point" x="915" y="365" /> + <di:waypoint xsi:type="dc:Point" x="940" y="365" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="885" y="358.5" width="90" height="13" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_10q79b6_di" bpmnElement="ExclusiveGateway_10q79b6" isMarkerVisible="true"> + <dc:Bounds x="602" y="632" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="584" y="686" width="86" height="36" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_024g0d1_di" bpmnElement="SequenceFlow_024g0d1"> + <di:waypoint xsi:type="dc:Point" x="652" y="657" /> + <di:waypoint xsi:type="dc:Point" x="683" y="657" /> + <di:waypoint xsi:type="dc:Point" x="683" y="657" /> + <di:waypoint xsi:type="dc:Point" x="713" y="657" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="677" y="634" width="12" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0vi883o_di" bpmnElement="SequenceFlow_0vi883o"> + <di:waypoint xsi:type="dc:Point" x="627" y="632" /> + <di:waypoint xsi:type="dc:Point" x="627" y="548" /> + <di:waypoint xsi:type="dc:Point" x="713" y="548" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="633" y="584" width="18" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0eana0l_di" bpmnElement="SequenceFlow_0eana0l"> + <di:waypoint xsi:type="dc:Point" x="763" y="588" /> + <di:waypoint xsi:type="dc:Point" x="763" y="617" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="778" y="596.5" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_10hs368_di" bpmnElement="Task_SendSyncAckError"> + <dc:Bounds x="713" y="508" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_0fuugr9_di" bpmnElement="SubProcess_0fuugr9" isExpanded="true"> + <dc:Bounds x="515" y="792" width="404" height="165" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_15qkxd7_di" bpmnElement="StartEvent_runtimeError"> + <dc:Bounds x="570" y="857" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="577" y="900" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1p4kxh2_di" bpmnElement="ServiceTask_HandleRuntimeError"> + <dc:Bounds x="690" y="835" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_09e3lu5_di" bpmnElement="EndEvent__runtimeError"> + <dc:Bounds x="856" y="857" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="784" y="897" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11d126w_di" bpmnElement="SequenceFlow_11d126w"> + <di:waypoint xsi:type="dc:Point" x="606" y="875" /> + <di:waypoint xsi:type="dc:Point" x="690" y="875" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="603" y="854" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0w4sx88_di" bpmnElement="SequenceFlow_0w4sx88"> + <di:waypoint xsi:type="dc:Point" x="790" y="875" /> + <di:waypoint xsi:type="dc:Point" x="856" y="875" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="778" y="854" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllBaseTaskTestSuite.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllBaseTaskTestSuite.java new file mode 100644 index 0000000000..18081878a8 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllBaseTaskTestSuite.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; + +import org.junit.runner.RunWith; + +import com.googlecode.junittoolbox.SuiteClasses; +import com.googlecode.junittoolbox.WildcardPatternSuite; + +@RunWith(WildcardPatternSuite.class) +@SuiteClasses({"**/common/aai/tasks/*Test.class", "**/bpmn/sdno/tasks/*Test.class", "**/buildingblock/SniroHomingTest.class"}) +public class AllBaseTaskTestSuite { + // the class remains empty, + // used only as a holder for the above annotations +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllTestSuites.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllTestSuites.java new file mode 100644 index 0000000000..98e613efe6 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/AllTestSuites.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; +import org.junit.runner.RunWith; + +import com.googlecode.junittoolbox.SuiteClasses; +import com.googlecode.junittoolbox.WildcardPatternSuite; + +@RunWith(WildcardPatternSuite.class) +@SuiteClasses({"**/*Test.class"}) +public class AllTestSuites { + // the class remains empty, + // used only as a holder for the above annotations +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseTest.java new file mode 100644 index 0000000000..2bec24e44b --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseTest.java @@ -0,0 +1,209 @@ +/*- + * ============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; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.junit.Before; +import org.junit.runner.RunWith; +import org.onap.so.bpmn.buildingblock.SniroHomingV2; +import org.onap.so.bpmn.common.DelegateExecutionImpl; +import org.onap.so.bpmn.common.InjectionHelper; +import org.onap.so.bpmn.common.MockLoggerDelegate; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAIFlagTasks; +import org.onap.so.bpmn.sdno.tasks.SDNOHealthCheckTasks; +import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; +import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupMapperLayer; +import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; +import org.onap.so.client.aai.mapper.AAIObjectMapper; +import org.onap.so.client.adapter.network.NetworkAdapterClientImpl; +import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper; +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIVnfResources; +import org.onap.so.client.orchestration.SDNOHealthCheckResources; +import org.onap.so.client.sdnc.SDNCClient; +import org.onap.so.client.sniro.SniroClient; +import org.onap.so.db.catalog.client.CatalogDbClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.boot.test.mock.mockito.SpyBean; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock; +import org.springframework.http.HttpHeaders; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +@ContextConfiguration +@AutoConfigureWireMock(port = 0) +public abstract class BaseTest extends BuildingBlockTestDataSetup { + + + protected Map<String, Object> variables = new HashMap<>(); + + protected TestRestTemplate restTemplate = new TestRestTemplate(); + + protected HttpHeaders headers = new HttpHeaders(); + + @Value("${wiremock.server.port") + protected String wireMockPort; + + @Autowired + protected RuntimeService runtimeService; + + @Autowired + private RepositoryService repositoryService; + /* + * Mocked for injection via autowiring + */ + + @Value("${mso.catalog.db.spring.endpoint}") + protected String endpoint; + + @MockBean + protected CatalogDbClient MOCK_catalogDbClient; + + @SpyBean + protected InjectionHelper MOCK_injectionHelper; + + @SpyBean + protected NetworkAdapterObjectMapper MOCK_networkAdapterObjectMapper; + + @SpyBean + protected AAIObjectMapper MOCK_aaiObjectMapper; + @SpyBean + protected NetworkAdapterClientImpl MOCK_networkAdapterClient; + @SpyBean + protected SDNCClient MOCK_sdncClient; + + @SpyBean + protected AAIFlagTasks aaiFlagTasks; + + @SpyBean + protected AAIVnfResources aaiVnfResources; + + @SpyBean + protected ExceptionBuilder exceptionUtil; + + @SpyBean + protected SDNOHealthCheckResources MOCK_sdnoHealthCheckResources; + + + + + + + + /* + * Classes that cannot be simply mocked because they are both + * needed for testing another class, and must be autowired when + * being tested themselves....or classes with private methods that + * must be stubbed during testing + */ + + + + + @SpyBean + protected BBInputSetupMapperLayer SPY_bbInputSetupMapperLayer; + @SpyBean + protected BBInputSetupUtils SPY_bbInputSetupUtils; + @SpyBean + protected BBInputSetup SPY_bbInputSetup; + @SpyBean + protected SniroHomingV2 sniroHoming; + + @SpyBean + protected SniroClient sniroClient; + + @SpyBean + protected SDNOHealthCheckTasks sdnoHealthCheckTasks; + + /* + * Mocked for injection via the IntectionHelper + */ + + + + @Before + public void baseTestBefore() { + variables.put("gBuildingBlockExecution", new DelegateExecutionImpl(new HashMap<>())); + + + } + + @LocalServerPort + private int port; + + protected String readFile(String path) throws IOException { + return readFile(path, Charset.defaultCharset()); + } + + protected String readFile(String path, Charset encoding) throws IOException { + byte[] encoded = Files.readAllBytes(Paths.get(path)); + return new String(encoded, encoding); + } + + protected String readJsonFileAsString(String fileLocation) throws IOException{ + ObjectMapper mapper = new ObjectMapper(); + JsonNode jsonNode = mapper.readTree(new File(fileLocation)); + return jsonNode.asText(); + } + + protected String createURLWithPort(String uri) { + return "http://localhost:" + port + uri; + } + /** + * Create and deploy a process model with one logger delegate as service task. + * + * @param origProcessKey + * key to call + * @param mockProcessName + * process name + * @param fileName + * file name without extension + */ + protected void mockSubprocess(String origProcessKey, String mockProcessName, String fileName) { + BpmnModelInstance modelInstance = Bpmn.createExecutableProcess(origProcessKey).name(mockProcessName) + .startEvent().name("Start Point").serviceTask().name("Log Something for Test") + .camundaClass(MockLoggerDelegate.class.getName()).endEvent().name("End Point").done(); + repositoryService.createDeployment().addModelInstance(fileName + ".bpmn", modelInstance).deploy(); + } + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseUnitTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseUnitTest.java new file mode 100644 index 0000000000..5719ce15e2 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BaseUnitTest.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; + +public abstract class BaseUnitTest extends BuildingBlockTestDataSetup{ + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java new file mode 100644 index 0000000000..9e6cfdb686 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java @@ -0,0 +1,665 @@ +/*- + * ============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; + +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import org.assertj.core.util.Arrays; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl; +import org.junit.Before; +import org.junit.Rule; +import org.junit.rules.ExpectedException; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.common.DelegateExecutionImpl; +import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup; +import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; +import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness; +import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Project; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBondingLink; +import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.exception.BBObjectNotFoundException; +import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoAllottedResource; +import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy; + +public class BuildingBlockTestDataSetup{ + private int collectionCounter; + private int configurationCounter; + private int customerCounter; + private int genericVnfCounter; + private int instanceGroupCounter; + private int l3NetworkCounter; + private int owningEntityCounter; + private int pnfCounter; + private int projectCounter; + private int serviceInstanceCounter; + private int serviceProxyCounter; + private int serviceSubscriptionCounter; + private int vfModuleCounter; + private int volumeGroupCounter; + private int vpnBindingCounter; + private int vpnBondingLinkCounter; + + protected BuildingBlockExecution execution; + + protected GeneralBuildingBlock gBBInput; + + protected HashMap<ResourceKey, String> lookupKeyMap; + + protected ExtractPojosForBB extractPojosForBB = new ExtractPojosForBB(); + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + protected DelegateExecution delegateExecution; + + @Before + public void buildingBlockTestDataSetupBefore() { + collectionCounter = 0; + configurationCounter = 0; + customerCounter = 0; + genericVnfCounter = 0; + instanceGroupCounter = 0; + l3NetworkCounter = 0; + owningEntityCounter = 0; + pnfCounter = 0; + projectCounter = 0; + serviceInstanceCounter = 0; + serviceProxyCounter = 0; + serviceSubscriptionCounter = 0; + vfModuleCounter = 0; + volumeGroupCounter = 0; + vpnBindingCounter = 0; + vpnBondingLinkCounter = 0; + + execution = new DelegateExecutionImpl(new ExecutionImpl()); + execution.setVariable("testProcessKey", "testProcessKeyValue"); + + gBBInput = new GeneralBuildingBlock(); + execution.setVariable("gBBInput", gBBInput); + + lookupKeyMap = new HashMap<ResourceKey, String>(); + execution.setVariable("lookupKeyMap", lookupKeyMap); + + ExecutionImpl mockExecutionImpl = mock(ExecutionImpl.class); + doReturn("test").when(mockExecutionImpl).getProcessInstanceId(); + + ExecutionImpl executionImpl = new ExecutionImpl(); + executionImpl.setProcessInstance(mockExecutionImpl); + + delegateExecution = (DelegateExecution) executionImpl; + delegateExecution.setVariable("testProcessKey", "testProcessKeyValue"); + } + + public Map<String, String> buildUserInput() { + Map<String, String> userInput = new HashMap<>(); + userInput.put("testUserInputKey", "testUserInputValue"); + + return userInput; + } + + public Map<String, String> setUserInput() { + Map<String, String> userInput = buildUserInput(); + + gBBInput.setUserInput(userInput); + + return userInput; + } + + public RequestContext buildRequestContext() { + RequestContext requestContext = new RequestContext(); + requestContext.setMsoRequestId(UUID.randomUUID().toString()); + requestContext.setProductFamilyId("testProductFamilyId"); + requestContext.setRequestorId("testRequestorId"); + + requestContext.setUserParams(new HashMap<>()); + + Map<String,Object> dataMap = new HashMap<>(); + dataMap.put("vpnId","testVpnId"); + dataMap.put("vpnRegion","testVpnRegion"); + dataMap.put("vpnRt","testVpnRt"); + dataMap.put("vpnName","vpnName"); + dataMap.put("vpnRegion", Arrays.asList(new String[] {"USA", "EMEA", "APAC"})); + + HashMap<String,Object> userParams = new HashMap<>(); + userParams.put("vpnData",dataMap); + + List<Map<String,Object>> userParamsList = new ArrayList<>(); + userParamsList.add(userParams); + + RequestParameters requestParameters = new RequestParameters(); + requestParameters.setUserParams(userParamsList); + requestContext.setRequestParameters(requestParameters); + + return requestContext; + } + + public RequestContext setRequestContext() { + RequestContext requestContext = buildRequestContext(); + + gBBInput.setRequestContext(requestContext); + + return requestContext; + } + + public CloudRegion buildCloudRegion() { + CloudRegion cloudRegion = new CloudRegion(); + cloudRegion.setLcpCloudRegionId("testLcpCloudRegionId"); + cloudRegion.setTenantId("testTenantId"); + cloudRegion.setCloudOwner("testCloudOwner"); + + return cloudRegion; + } + + public CloudRegion setCloudRegion() { + CloudRegion cloudRegion = buildCloudRegion(); + + gBBInput.setCloudRegion(cloudRegion); + + return cloudRegion; + } + + public OrchestrationContext buildOrchestrationContext() { + OrchestrationContext orchestrationContext = new OrchestrationContext(); + + return orchestrationContext; + } + + public OrchestrationContext setOrchestrationContext() { + OrchestrationContext orchestrationContext = buildOrchestrationContext(); + + gBBInput.setOrchContext(orchestrationContext); + + return orchestrationContext; + } + + public Collection buildCollection() { + collectionCounter++; + + Collection collection = new Collection(); + collection.setId("testId" + collectionCounter); + collection.setInstanceGroup(buildInstanceGroup()); + + return collection; + } + + public Configuration buildConfiguration() { + configurationCounter++; + + Configuration configuration = new Configuration(); + configuration.setConfigurationId("testConfigurationId" + configurationCounter); + configuration.setConfigurationName("testConfigurationName" + configurationCounter); + + ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration(); + modelInfoConfiguration.setModelVersionId("testModelVersionId" + configurationCounter); + modelInfoConfiguration.setModelInvariantId("testModelInvariantId" + configurationCounter); + modelInfoConfiguration.setModelCustomizationId("testModelCustomizationId" + configurationCounter); + + configuration.setModelInfoConfiguration(modelInfoConfiguration); + + return configuration; + } + + public OwningEntity buildOwningEntity() { + owningEntityCounter++; + + OwningEntity owningEntity = new OwningEntity(); + owningEntity.setOwningEntityId("testOwningEntityId" + owningEntityCounter); + owningEntity.setOwningEntityName("testOwningEntityName" + owningEntityCounter); + + return owningEntity; + } + + public Project buildProject() { + projectCounter++; + + Project project = new Project(); + project.setProjectName("testProjectName" + projectCounter); + + return project; + } + + public ServiceSubscription buildServiceSubscription() { + serviceSubscriptionCounter++; + + ServiceSubscription serviceSubscription = new ServiceSubscription(); + serviceSubscription.setTempUbSubAccountId("testTempUbSubAccountId" + serviceSubscriptionCounter); + serviceSubscription.setServiceType("testServiceType" + serviceSubscriptionCounter); + + return serviceSubscription; + } + + public Customer buildCustomer() { + customerCounter++; + + Customer customer = new Customer(); + customer.setGlobalCustomerId("testGlobalCustomerId" + customerCounter); + customer.setSubscriberType("testSubscriberType" + customerCounter); + + customer.setServiceSubscription(buildServiceSubscription()); + + return customer; + } + + public ServiceInstance buildServiceInstance() { + serviceInstanceCounter++; + + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setServiceInstanceId("testServiceInstanceId" + serviceInstanceCounter); + serviceInstance.setServiceInstanceName("testServiceInstanceName" + serviceInstanceCounter); + + ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance(); + modelInfoServiceInstance.setModelInvariantUuid("testModelInvariantUUID" + serviceInstanceCounter); + modelInfoServiceInstance.setModelUuid("testModelUUID" + serviceInstanceCounter); + modelInfoServiceInstance.setModelVersion("testModelVersion" + serviceInstanceCounter); + modelInfoServiceInstance.setModelName("testModelName" + serviceInstanceCounter); + modelInfoServiceInstance.setServiceType("testServiceType" + serviceInstanceCounter); + serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance); + + serviceInstance.setProject(buildProject()); + + serviceInstance.setOwningEntity(buildOwningEntity()); + + serviceInstance.setCollection(buildCollection()); + + serviceInstance.getConfigurations().add(buildConfiguration()); + + return serviceInstance; + } + + public ServiceInstance setServiceInstance() { + ServiceInstance serviceInstance = buildServiceInstance(); + + if(gBBInput.getCustomer() == null) { + gBBInput.setCustomer(buildCustomer()); + } + gBBInput.getCustomer().getServiceSubscription().getServiceInstances().add(serviceInstance); + lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstance.getServiceInstanceId()); + + return serviceInstance; + } + + public Customer setCustomer() { + if(gBBInput.getCustomer() != null) return gBBInput.getCustomer(); + Customer customer = new Customer(); + customer.setGlobalCustomerId("testGlobalCustomerId"); + customer.setSubscriberType("testSubscriberType"); + + customer.setServiceSubscription(buildServiceSubscription()); + + gBBInput.setCustomer(customer); + + return customer; + } + + public Collection setCollection() { + Collection collection = new Collection(); + collection.setId("testId"); + + ServiceInstance serviceInstance = null; + + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + + serviceInstance.setCollection(collection); + + return collection; + } + + public InstanceGroup setInstanceGroup() { + InstanceGroup instanceGroup = new InstanceGroup(); + instanceGroup.setId("testId"); + instanceGroup.setInstanceGroupFunction("testInstanceGroupFunction"); + + Collection collection = null; + + try { + ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + collection = serviceInstance.getCollection(); + + if (collection == null) { + collection = setCollection(); + } + } catch(BBObjectNotFoundException e) { + collection = setCollection(); + } + + collection.setInstanceGroup(instanceGroup); + + return instanceGroup; + } + + public VpnBinding buildVpnBinding() { + vpnBindingCounter++; + + VpnBinding vpnBinding = new VpnBinding(); + vpnBinding.setVpnId("testVpnId" + vpnBindingCounter); + vpnBinding.setVpnName("testVpnName" + vpnBindingCounter); + vpnBinding.setCustomerVpnId("testCustomerVpnId" + vpnBindingCounter); + + return vpnBinding; + } + + public VpnBinding setVpnBinding() { + VpnBinding vpnBinding = buildVpnBinding(); + + Customer customer = gBBInput.getCustomer(); + + if(customer == null){ + customer = buildCustomer(); + } + + customer.getVpnBindings().add(vpnBinding); + lookupKeyMap.put(ResourceKey.VPN_ID, vpnBinding.getVpnId()); + + return vpnBinding; + } + + public InstanceGroup buildInstanceGroup() { + instanceGroupCounter++; + + InstanceGroup instanceGroup = new InstanceGroup(); + instanceGroup.setId("testId" + instanceGroupCounter); + instanceGroup.setInstanceGroupFunction("testInstanceGroupFunction" + instanceGroupCounter); + + return instanceGroup; + } + + public L3Network buildL3Network() { + l3NetworkCounter++; + + L3Network network = new L3Network(); + network.setNetworkId("testNetworkId" + l3NetworkCounter); + network.setNetworkName("testNetworkName" + l3NetworkCounter); + network.setNetworkType("testNetworkType" + l3NetworkCounter); + + ModelInfoNetwork modelInfoNetwork = new ModelInfoNetwork(); + modelInfoNetwork.setModelInvariantUUID("testModelInvariantUUID" + l3NetworkCounter); + modelInfoNetwork.setModelName("testModelName" + l3NetworkCounter); + modelInfoNetwork.setModelVersion("testModelVersion" + l3NetworkCounter); + modelInfoNetwork.setModelUUID("testModelUUID" + l3NetworkCounter); + network.setModelInfoNetwork(modelInfoNetwork); + + return network; + } + + public L3Network setL3Network() { + L3Network network = buildL3Network(); + + ServiceInstance serviceInstance = null; + + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + + serviceInstance.getNetworks().add(network); + lookupKeyMap.put(ResourceKey.NETWORK_ID, network.getNetworkId()); + + return network; + } + + public GenericVnf buildGenericVnf() { + genericVnfCounter++; + + GenericVnf genericVnf = new GenericVnf(); + genericVnf.setVnfId("testVnfId" + genericVnfCounter); + genericVnf.setVnfName("testVnfName" + genericVnfCounter); + genericVnf.setVnfType("testVnfType" + genericVnfCounter); + + Platform platform = new Platform(); + platform.setPlatformName("testPlatformName"); + genericVnf.setPlatform(platform); + + LineOfBusiness lob = new LineOfBusiness(); + lob.setLineOfBusinessName("testLineOfBusinessName"); + genericVnf.setLineOfBusiness(lob); + + ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf(); + modelInfoGenericVnf.setModelName("testModelName" + genericVnfCounter); + modelInfoGenericVnf.setModelCustomizationUuid("testModelCustomizationUUID" + genericVnfCounter); + modelInfoGenericVnf.setModelInvariantUuid("testModelInvariantUUID" + genericVnfCounter); + modelInfoGenericVnf.setModelVersion("testModelVersion" + genericVnfCounter); + modelInfoGenericVnf.setModelUuid("testModelUUID" + genericVnfCounter); + genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf); + + return genericVnf; + } + + public GenericVnf setGenericVnf() { + GenericVnf genericVnf = buildGenericVnf(); + + ServiceInstance serviceInstance = null; + + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + + serviceInstance.getVnfs().add(genericVnf); + lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, genericVnf.getVnfId()); + + return genericVnf; + } + + public VfModule buildVfModule() { + vfModuleCounter++; + + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("testVfModuleId" + vfModuleCounter); + vfModule.setVfModuleName("testVfModuleName" + vfModuleCounter); + + ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule(); + modelInfoVfModule.setModelInvariantUUID("testModelInvariantUUID" + vfModuleCounter); + modelInfoVfModule.setModelVersion("testModelVersion" + vfModuleCounter); + modelInfoVfModule.setModelUUID("testModelUUID" + vfModuleCounter); + modelInfoVfModule.setModelName("testModelName" + vfModuleCounter); + modelInfoVfModule.setModelCustomizationUUID("testModelCustomizationUUID" + vfModuleCounter); + vfModule.setModelInfoVfModule(modelInfoVfModule); + + return vfModule; + } + + public VfModule setVfModule() { + VfModule vfModule = buildVfModule(); + + GenericVnf genericVnf = null; + + try { + genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + } catch(BBObjectNotFoundException e) { + genericVnf = setGenericVnf(); + } + + genericVnf.getVfModules().add(vfModule); + lookupKeyMap.put(ResourceKey.VF_MODULE_ID, vfModule.getVfModuleId()); + + return vfModule; + } + + public VolumeGroup buildVolumeGroup() { + volumeGroupCounter++; + + VolumeGroup volumeGroup = new VolumeGroup(); + volumeGroup.setVolumeGroupId("testVolumeGroupId" + volumeGroupCounter); + volumeGroup.setVolumeGroupName("testVolumeGroupName" + volumeGroupCounter); + volumeGroup.setHeatStackId("testHeatStackId" + volumeGroupCounter); + + return volumeGroup; + } + + public VolumeGroup setVolumeGroup() { + VolumeGroup volumeGroup = buildVolumeGroup(); + + GenericVnf genericVnf = null; + + try { + genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + } catch(BBObjectNotFoundException e) { + genericVnf = setGenericVnf(); + } + + genericVnf.getVolumeGroups().add(volumeGroup); + lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId()); + + return volumeGroup; + } + + public Pnf buildPnf() { + pnfCounter++; + + Pnf pnf = new Pnf(); + pnf.setPnfId("testPnfId" + pnfCounter); + pnf.setPnfName("testPnfName" + pnfCounter); + + return pnf; + } + + public ServiceProxy buildServiceProxy() { + serviceProxyCounter++; + + ServiceProxy serviceProxy = new ServiceProxy(); + serviceProxy.setServiceInstance(buildServiceInstance()); + serviceProxy.getServiceInstance().getVnfs().add(buildGenericVnf()); + + Pnf primaryPnf = buildPnf(); + primaryPnf.setRole("Primary"); + serviceProxy.getServiceInstance().getPnfs().add(primaryPnf); + + Pnf secondaryPnf = buildPnf(); + secondaryPnf.setRole("Secondary"); + serviceProxy.getServiceInstance().getPnfs().add(secondaryPnf); + + return serviceProxy; + } + + public VpnBondingLink buildVpnBondingLink() { + vpnBondingLinkCounter++; + + VpnBondingLink vpnBondingLink = new VpnBondingLink(); + vpnBondingLink.setVpnBondingLinkId("testVpnBondingLinkId" + vpnBondingLinkCounter); + + Configuration vnrConfiguration = buildConfiguration(); + vnrConfiguration.setNetwork(buildL3Network()); + vpnBondingLink.setVnrConfiguration(vnrConfiguration); + + vpnBondingLink.setVrfConfiguration(buildConfiguration()); + + vpnBondingLink.setInfrastructureServiceProxy(buildServiceProxy()); + + vpnBondingLink.setTransportServiceProxy(buildServiceProxy()); + + return vpnBondingLink; + } + + public VpnBondingLink setVpnBondingLink() { + VpnBondingLink vpnBondingLink = buildVpnBondingLink(); + + ServiceInstance serviceInstance = null; + + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + + serviceInstance.getVpnBondingLinks().add(vpnBondingLink); + lookupKeyMap.put(ResourceKey.VPN_BONDING_LINK_ID, vpnBondingLink.getVpnBondingLinkId()); + + + return vpnBondingLink; + } + + public Customer setAvpnCustomer() { + Customer customer = buildCustomer(); + + gBBInput.setCustomer(customer); + + return customer; + } + + public ServiceProxy setServiceProxy(String uniqueIdentifier, String type) { + ServiceProxy serviceProxy = new ServiceProxy(); + serviceProxy.setId("testProxyId" + uniqueIdentifier); + serviceProxy.setType(type); + + ModelInfoServiceProxy modelInfo = new ModelInfoServiceProxy(); + modelInfo.setModelInvariantUuid("testProxyModelInvariantUuid" + uniqueIdentifier); + modelInfo.setModelName("testProxyModelName" + uniqueIdentifier); + modelInfo.setModelUuid("testProxyModelUuid" + uniqueIdentifier); + modelInfo.setModelVersion("testProxyModelVersion" + uniqueIdentifier); + + serviceProxy.setModelInfoServiceProxy(modelInfo); + + return serviceProxy; + } + + public AllottedResource setAllottedResource(String uniqueIdentifier) { + AllottedResource ar = new AllottedResource(); + ar.setId("testAllottedResourceId" + uniqueIdentifier); + + ModelInfoAllottedResource modelInfo = new ModelInfoAllottedResource(); + modelInfo.setModelInvariantUuid("testProxyModelInvariantUuid" + uniqueIdentifier); + modelInfo.setModelName("testProxyModelName" + uniqueIdentifier); + modelInfo.setModelUuid("testProxyModelUuid" + uniqueIdentifier); + modelInfo.setModelVersion("testProxyModelVersion" + uniqueIdentifier); + + ar.setModelInfoAllottedResource(modelInfo); + + return ar; + } +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java new file mode 100644 index 0000000000..a29df9cbcf --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java @@ -0,0 +1,64 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; +import ch.vorburger.exec.ManagedProcessException; +import ch.vorburger.mariadb4j.DBConfigurationBuilder; +import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import javax.sql.DataSource; + +@Configuration +@Profile({"test"}) +public class EmbeddedMariaDbConfig { + + @Bean + MariaDB4jSpringService mariaDB4jSpringService() { + MariaDB4jSpringService service = new MariaDB4jSpringService(); + + + service.getConfiguration().addArg("--lower_case_table_names=1"); + return service; + } + + @Bean + DataSource dataSource(MariaDB4jSpringService mariaDB4jSpringService, + @Value("${mariaDB4j.databaseName}") String databaseName, + @Value("${spring.datasource.username}") String datasourceUsername, + @Value("${spring.datasource.password}") String datasourcePassword, + @Value("${spring.datasource.driver-class-name}") String datasourceDriver) throws ManagedProcessException { + //Create our database with default root user and no password + mariaDB4jSpringService.getDB().createDB(databaseName); + + DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration(); + + return DataSourceBuilder + .create() + .username(datasourceUsername) + .password(datasourcePassword) + .url(config.getURL(databaseName)) + .driverClassName(datasourceDriver) + .build(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/IntegrationTestSuite.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/IntegrationTestSuite.java new file mode 100644 index 0000000000..265b6615c0 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/IntegrationTestSuite.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; +import org.junit.runner.RunWith; + +import com.googlecode.junittoolbox.SuiteClasses; +import com.googlecode.junittoolbox.WildcardPatternSuite; + +@RunWith(WildcardPatternSuite.class) +@SuiteClasses({"**/*IT.class"}) +public class IntegrationTestSuite { + // the class remains empty, + // used only as a holder for the above annotations +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/SerializableChecker.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/SerializableChecker.java new file mode 100644 index 0000000000..97c17d5238 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/SerializableChecker.java @@ -0,0 +1,181 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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; + +import java.io.Serializable; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public final class SerializableChecker +{ + public static class SerializationFailure + { + private final String mContainingClass; + private final String mMemberName; + + public SerializationFailure(String inNonSerializableClass, String inMemberName) + { + mContainingClass = inNonSerializableClass; + mMemberName = inMemberName; + } + + public String getContainingClass() + { + return mContainingClass; + } + + public String getMemberName() + { + return mMemberName; + } + + public String getBadMemberString() + { + if (mMemberName == null) + return mContainingClass; + return mContainingClass + "." + mMemberName; + } + + @Override + public String toString() + { + return "SerializationFailure [mNonSerializableClass=" + mContainingClass + ", mMemberName=" + mMemberName + "]"; + } + } + + private static class SerializationCheckerData + { + private Set<Class<?>> mSerializableClasses; + + SerializationCheckerData() + { + mSerializableClasses = new HashSet<Class<?>>(); + } + + boolean isAlreadyChecked(Class<?> inClass) + { + return mSerializableClasses.contains(inClass); + } + + void addSerializableClass(Class<?> inClass) + { + mSerializableClasses.add(inClass); + } + } + + private SerializableChecker() + { } + + public static SerializationFailure isFullySerializable(Class<?> inClass) + { + if (!isSerializable(inClass)) + return new SerializationFailure(inClass.getName(), null); + + return isFullySerializable(inClass, new SerializationCheckerData()); + } + + private static SerializationFailure isFullySerializable(Class<?> inClass, SerializationCheckerData inSerializationCheckerData) + { + for (Field field : declaredFields(inClass)) + { + Class<?> fieldDeclaringClass = field.getType(); + + if (field.getType() == Object.class) + continue; + + if (Modifier.isStatic(field.getModifiers())) + continue; + + if (field.isSynthetic()) + continue; + + if (fieldDeclaringClass.isInterface() || fieldDeclaringClass.isPrimitive()) + continue; + + if (Modifier.isAbstract(field.getType().getModifiers())) + continue; + + if (inSerializationCheckerData.isAlreadyChecked(fieldDeclaringClass)) + continue; + + if (isSerializable(fieldDeclaringClass)) + { + inSerializationCheckerData.addSerializableClass(inClass); + + SerializationFailure failure = isFullySerializable(field.getType(), inSerializationCheckerData); + if (failure != null) + return failure; + else + continue; + } + + if (Modifier.isTransient(field.getModifiers())) + continue; + + return new SerializationFailure(field.getDeclaringClass().getName(), field.getName()); + } + return null; + } + + private static boolean isSerializable(Class<?> inClass) + { + Set<Class<?>> interfaces = getInterfaces(inClass); + if (interfaces == null) + return false; + boolean isSerializable = interfaces.contains(Serializable.class); + if (isSerializable) + return true; + + for (Class<?> classInterface : interfaces) + { + if (isSerializable(classInterface)) + return true; + } + + if (inClass.getSuperclass() != null && isSerializable(inClass.getSuperclass())) + return true; + + return false; + } + + private static Set<Class<?>> getInterfaces(Class<?> inFieldDeclaringClass) + { + return new HashSet<Class<?>>(Arrays.asList(inFieldDeclaringClass.getInterfaces())); + } + + private static List<Field> declaredFields(Class<?> inClass) + { + List<Field> fields = new ArrayList<Field>(Arrays.asList(inClass.getDeclaredFields())); + + Class<?> parentClasses = inClass.getSuperclass(); + + if (parentClasses == null) + return fields; + fields.addAll(declaredFields(parentClasses)); + + return fields; + } + } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java new file mode 100644 index 0000000000..314cc0b2de --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java @@ -0,0 +1,55 @@ +/*- + * ============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; + +import java.io.IOException; + +import javax.annotation.PreDestroy; + +import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; +import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; +import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; +import org.onap.so.requestsdb.RequestsDBHelper; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.FilterType; +import org.springframework.context.annotation.Profile; + +import ch.vorburger.mariadb4j.MariaDB4jService; + +@SpringBootApplication +@Profile("test") +@EnableProcessApplication("MSO CommonBPMN Test Application") +@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), + @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), + @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) +public class TestApplication { + public static void main(String... args) { + SpringApplication.run(TestApplication.class, args); + System.getProperties().setProperty("mso.db", "MARIADB"); + System.getProperties().setProperty("server.name", "Springboot"); + + + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java new file mode 100644 index 0000000000..f6d81ba771 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java @@ -0,0 +1,245 @@ +/*- + * ============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; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.extension.mockito.mock.FluentJavaDelegateMock; +import org.camunda.bpm.model.bpmn.Bpmn; +import org.camunda.bpm.model.bpmn.BpmnModelInstance; +import org.camunda.bpm.model.bpmn.builder.ServiceTaskBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.runner.RunWith; +import org.onap.so.TestApplication; +import org.onap.so.bpmn.common.DelegateExecutionImpl; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAICommonTasks; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAICreateTasks; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAIDeleteTasks; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAIQueryTasks; +import org.onap.so.bpmn.infrastructure.aai.tasks.AAIUpdateTasks; +import org.onap.so.bpmn.infrastructure.adapter.network.tasks.NetworkAdapterCreateTasks; +import org.onap.so.bpmn.infrastructure.adapter.network.tasks.NetworkAdapterDeleteTasks; +import org.onap.so.bpmn.infrastructure.adapter.network.tasks.NetworkAdapterUpdateTasks; +import org.onap.so.bpmn.infrastructure.adapter.vnf.tasks.VnfAdapterCreateTasks; +import org.onap.so.bpmn.infrastructure.adapter.vnf.tasks.VnfAdapterDeleteTasks; +import org.onap.so.bpmn.infrastructure.adapter.vnf.tasks.VnfAdapterImpl; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetwork; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignVnf; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetwork; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetworkCollection; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignNetworkBB; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignVnf; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCActivateTasks; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCAssignTasks; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCChangeAssignTasks; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCDeactivateTasks; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCQueryTasks; +import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCUnassignTasks; +import org.onap.so.bpmn.infrastructure.workflow.tasks.OrchestrationStatusValidator; +import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowAction; +import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionBBTasks; +import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; +import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; +import org.onap.so.bpmn.servicedecomposition.tasks.ExecuteBuildingBlockRainyDay; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.embedded.LocalServerPort; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.http.HttpHeaders; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@ActiveProfiles("test") +public abstract class BaseBPMNTest { + @Autowired + protected RuntimeService runtimeService; + + @Autowired + private RepositoryService repositoryService; + + protected Map<String, Object> variables = new HashMap<>(); + + protected List<String> mockedSubprocessList = new ArrayList<>(); + + protected TestRestTemplate restTemplate = new TestRestTemplate(); + + protected HttpHeaders headers = new HttpHeaders(); + + @MockBean + protected AAIUpdateTasks aaiUpdateTasks; + + @MockBean + protected AAICreateTasks aaiCreateTasks; + + @MockBean + protected AAIQueryTasks aaiQueryTasks; + + @MockBean + protected AAIDeleteTasks aaiDeleteTasks; + + @MockBean + protected SDNCActivateTasks sdncActivateTasks; + + @MockBean + protected SDNCAssignTasks sdncAssignTasks; + + @MockBean + protected SDNCUnassignTasks sdncUnassignTasks; + + @MockBean + protected SDNCDeactivateTasks sdncDeactivateTasks; + + @MockBean + protected SDNCQueryTasks sdncQueryTasks; + + @MockBean + protected SDNCChangeAssignTasks sdncChangeAssignTasks; + + @MockBean + protected NetworkAdapterDeleteTasks networkAdapterDeleteTasks; + + @MockBean + protected NetworkAdapterUpdateTasks networkAdapterUpdateTasks; + + @MockBean + protected VnfAdapterCreateTasks vnfAdapterCreateTasks; + + @MockBean + protected NetworkAdapterCreateTasks networkAdapterCreateTasks; + + @MockBean + protected CreateNetwork createNetwork; + + @MockBean + protected AssignNetworkBBUtils assignNetworkBBUtils; + + @MockBean + protected AssignNetwork assignNetwork; + + @MockBean + protected CreateNetworkCollection createNetworkCollection; + + @MockBean + protected VnfAdapterDeleteTasks vnfAdapterDeleteTasks; + + @MockBean + protected AAICommonTasks aaiCommonTasks; + + @MockBean + protected AssignVnf assignVnf; + + @MockBean + protected UnassignVnf unassignVnf; + + @MockBean + protected VnfAdapterImpl vnfAdapterImpl; + + @MockBean + protected UnassignNetworkBB unassignNetworkBB; + + @MockBean + protected OrchestrationStatusValidator orchestrationStatusValidator; + + @MockBean + protected BBInputSetup bbInputSetup; + + @MockBean + protected BBInputSetupUtils bbInputSetupUtils; + + @MockBean + protected ExecuteBuildingBlockRainyDay executeBuildingBlockRainyDay; + + @MockBean + protected WorkflowAction workflowAction; + + @MockBean + protected WorkflowActionBBTasks workflowActionBBTasks; + + @LocalServerPort + private int port; + + protected String createURLWithPort(String uri) { + return "http://localhost:" + port + uri; + } + + @Before + public void baseBefore() { + variables.put("gBuildingBlockExecution", new DelegateExecutionImpl(new HashMap<>())); + } + + @After + public void baseAfter() { + for (String deploymentId : mockedSubprocessList) { + repositoryService.deleteDeployment(deploymentId); + } + mockedSubprocessList.clear(); + } + + /** + * Create and deploy a process model with one logger delegate as service task. + * + * @param origProcessKey + * key to call + * @param mockProcessName + * process name + * @param fileName + * file name without extension + */ + protected void mockSubprocess(String origProcessKey, String mockProcessName, String fileName) { + mockSubprocess(origProcessKey, mockProcessName, fileName, new HashMap<String, String>()); + } + + /** + * Create and deploy a process model with one logger delegate as service task. + * + * @param origProcessKey + * key to call + * @param mockProcessName + * process name + * @param fileName + * file name without extension + * @param outParam + * output parameters + */ + protected void mockSubprocess(String origProcessKey, String mockProcessName, String fileName, Map<String, String> outParam) { + ServiceTaskBuilder builder = Bpmn + .createExecutableProcess(origProcessKey).name(mockProcessName) + .startEvent().name("Start_Event") + .serviceTask().name("Mock_Delegate") + .camundaClass(FluentJavaDelegateMock.class); + + for (String key : outParam.keySet()) { + builder.camundaOutputParameter(key, outParam.get(key)); + } + + BpmnModelInstance modelInstance = builder.endEvent().name("End_Event").done(); + mockedSubprocessList.add(repositoryService.createDeployment().addModelInstance(fileName + ".bpmn", modelInstance).deploy().getId()); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java new file mode 100644 index 0000000000..c05d42c420 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java @@ -0,0 +1,74 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.buildingblock; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.BaseTest; +import org.onap.so.bpmn.buildingblock.SniroHomingV2; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.springframework.boot.test.mock.mockito.MockBean; + + +@Ignore //these test run locally but fail when ran in conjunction with others in jenkins +public class SniroHomingV2BBTest extends BaseTest{ + + @MockBean + protected SniroHomingV2 sniroHoming; + + @Test + public void testHomingV2_success(){ + mockSubprocess("ReceiveWorkflowMessage", "Mock ReceiveWorkflowMessage", "GenericStub"); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingV2", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("start", "callSniro", "callReceiveAsync", "processSolution", "end"); + assertThat(pi).isEnded(); + } + + @Test + public void testHomingV2_error_bpmnError(){ + doThrow(new BpmnError("MSOWorkflowException")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingV2", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("start", "catchBpmnError", "processBpmnError", "endBpmnError") + .hasNotPassed("callReceiveAsync"); + assertThat(pi).isEnded(); + } + + @Test + public void testHomingV2_error_javaException(){ + doThrow(new RuntimeException("Test")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingV2", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("start", "catchJavaException", "processJavaException", "endJavaException") + .hasNotPassed("callReceiveAsync"); + assertThat(pi).isEnded(); + } + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java new file mode 100644 index 0000000000..bed591500a --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java @@ -0,0 +1,498 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.buildingblock; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.isA; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.json.JSONArray; +import org.json.JSONObject; +import org.junit.Before; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.onap.so.BaseTest; +import org.onap.so.bpmn.mock.FileUtil; +import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBondingLink; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters; +import org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate; +import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType; +import org.onap.so.client.exception.BadResponseException; +import org.onap.so.client.sniro.beans.SniroManagerRequest; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + + +public class SniroHomingV2Test extends BaseTest{ + + private ServiceInstance serviceInstance; + + private RequestContext requestContext; + + private Customer customer; + ObjectMapper mapper = new ObjectMapper(); + + private static final String RESOURCE_PATH = "__files/BuildingBlocks/SniroHoming/"; + + + String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"corys cool\", \"requestStatus\": \"accepted\"}"; + + @Before + public void before() { + serviceInstance = setServiceInstance(); + customer = setCustomer(); + customer.setGlobalCustomerId("testCustomerId"); + customer.setSubscriberName("testCustomerName"); + customer.getServiceSubscription().getServiceInstances().add(serviceInstance); + + requestContext = setRequestContext(); + requestContext.setMsoRequestId("testRequestId"); + RequestParameters params = new RequestParameters(); + params.setaLaCarte(false); + params.setSubscriptionServiceType("iptollfree"); + requestContext.setRequestParameters(params); + } + + public void beforeVpnBondingLink(String id){ + VpnBondingLink bondingLink = new VpnBondingLink(); + bondingLink.setVpnBondingLinkId("testVpnBondingId" + id); + bondingLink.getServiceProxies().add(setServiceProxy("1", "transport")); + ServiceProxy sp2 = setServiceProxy("2", "infrastructure"); + Candidate requiredCandidate = new Candidate(); + requiredCandidate.setCandidateType(CandidateType.VNF_ID); + List<String> c = new ArrayList<String>(); + c.add("testVnfId"); + requiredCandidate.setCandidates(c); + sp2.addRequiredCandidates(requiredCandidate); + bondingLink.getServiceProxies().add(sp2); + serviceInstance.getVpnBondingLinks().add(bondingLink); + + } + + public void beforeAllottedResource(){ + serviceInstance.getAllottedResources().add(setAllottedResource("1")); + serviceInstance.getAllottedResources().add(setAllottedResource("2")); + serviceInstance.getAllottedResources().add(setAllottedResource("3")); + } + + public void beforeVnf(){ + setGenericVnf(); + } + + @Test(expected = Test.None.class) + public void testCallSniro_success_1VpnLink() throws BadResponseException, IOException{ + beforeVpnBondingLink("1"); + + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + String request = FileUtil.readResourceFile(RESOURCE_PATH + "SniroManagerRequest1Vpn.json"); + request = request.replace("28080", wireMockPort); + + ArgumentCaptor<SniroManagerRequest> argument = ArgumentCaptor.forClass(SniroManagerRequest.class); + verify(sniroClient, times(1)).postDemands(argument.capture()); + assertEquals(request, argument.getValue().toJsonString()); + } + + @Test + public void testCallSniro_success_3VpnLink() throws JsonProcessingException, BadResponseException{ + beforeVpnBondingLink("1"); + beforeVpnBondingLink("2"); + beforeVpnBondingLink("3"); + + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + String request = FileUtil.readResourceFile(RESOURCE_PATH + "SniroManagerRequest3Vpn.json"); + request = request.replace("28080", wireMockPort); + + ArgumentCaptor<SniroManagerRequest> argument = ArgumentCaptor.forClass(SniroManagerRequest.class); + verify(sniroClient, times(1)).postDemands(argument.capture()); + assertEquals(request, argument.getValue().toJsonString()); + } + + @Test + public void testCallSniro_success_3Allotteds() throws BadResponseException, JsonProcessingException{ + beforeAllottedResource(); + + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + String request = FileUtil.readResourceFile(RESOURCE_PATH + "SniroManagerRequest3AR.json"); + request = request.replace("28080", wireMockPort); + + ArgumentCaptor<SniroManagerRequest> argument = ArgumentCaptor.forClass(SniroManagerRequest.class); + verify(sniroClient, times(1)).postDemands(argument.capture()); + assertEquals(request, argument.getValue().toJsonString()); + } + + @Test + public void testCallSniro_success_1Vnf() throws JsonProcessingException, BadResponseException{ + beforeVnf(); + + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + ArgumentCaptor<SniroManagerRequest> argument = ArgumentCaptor.forClass(SniroManagerRequest.class); + verify(sniroClient, times(1)).postDemands(argument.capture()); + //TODO assertEquals(request, argument.getValue().toJsonString()); + } + + @Test + public void testCallSniro_success_3Allotteds1Vnf() throws JsonProcessingException, BadResponseException{ + beforeAllottedResource(); + beforeVnf(); + + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + verify(sniroClient, times(1)).postDemands(isA(SniroManagerRequest.class)); + } + + @Test(expected = Test.None.class) + public void testProcessSolution_success_1VpnLink_1Solution(){ + beforeVpnBondingLink("1"); + + JSONObject asyncResponse = new JSONObject(); + asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed"); + JSONArray solution1 = new JSONArray(); + solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId1")))); + solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName2")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "secondaryPnfName").put("value", "testSecondaryPnfName2")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId2")))); + + asyncResponse.put("solutions", new JSONObject().put("placementSolutions", new JSONArray().put(solution1)).put("licenseSolutions", new JSONArray())); + + sniroHoming.processSolution(execution, asyncResponse.toString()); + + ServiceInstance si = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0); + + assertFalse(si.getVpnBondingLinks().isEmpty()); + VpnBondingLink link = si.getVpnBondingLinks().get(0); + assertNotNull(link); + assertFalse(link.getServiceProxies().isEmpty()); + + assertEquals("testServiceInstanceId1", link.getServiceProxy("testProxyId1").getServiceInstance().getServiceInstanceId()); + assertNotNull(link.getServiceProxy("testProxyId1").getServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName1", link.getServiceProxy("testProxyId1").getServiceInstance().getVnfs().get(0).getVnfName()); + + assertEquals("testServiceInstanceId2", link.getServiceProxy("testProxyId2").getServiceInstance().getServiceInstanceId()); + assertNotNull(link.getServiceProxy("testProxyId2").getServiceInstance().getSolutionInfo()); + assertFalse(link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().isEmpty()); + assertEquals("testPrimaryPnfName2", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getPnfName()); + assertEquals("primary", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getRole()); + assertEquals("testSecondaryPnfName2", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getPnfName()); + assertEquals("secondary", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getRole()); + } + + @Test + public void testProcessSolution_success_1VpnLink_2Solutions(){ + beforeVpnBondingLink("1"); + + JSONObject asyncResponse = new JSONObject(); + asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed"); + JSONArray solution1 = new JSONArray(); + solution1.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId1")))); + solution1.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName2")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "secondaryPnfName").put("value", "testSecondaryPnfName2")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId2")))); + + JSONArray solution2 = new JSONArray(); + solution2.put(new JSONObject().put("serviceResourceId", "testProxyId1").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId3"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName3")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli3")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId3")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId3")))); + solution2.put(new JSONObject().put("serviceResourceId", "testProxyId2").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId4"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "False")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "primaryPnfName").put("value", "testPrimaryPnfName4")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli4")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "secondaryPnfName").put("value", "testSecondaryPnfName4")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testSloudRegionId4")))); + + asyncResponse.put("solutions", new JSONObject().put("placementSolutions", new JSONArray().put(solution1).put(solution2)).put("licenseSolutions", new JSONArray())); + + sniroHoming.processSolution(execution, asyncResponse.toString()); + + ServiceInstance si = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0); + + assertFalse(si.getVpnBondingLinks().isEmpty()); + VpnBondingLink link = si.getVpnBondingLinks().get(0); + VpnBondingLink link2 = si.getVpnBondingLinks().get(1); + assertNotNull(link); + assertFalse(link.getServiceProxies().isEmpty()); + + assertEquals("testServiceInstanceId1", link.getServiceProxy("testProxyId1").getServiceInstance().getServiceInstanceId()); + assertNotNull(link.getServiceProxy("testProxyId1").getServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName1", link.getServiceProxy("testProxyId1").getServiceInstance().getVnfs().get(0).getVnfName()); + + assertEquals("testServiceInstanceId2", link.getServiceProxy("testProxyId2").getServiceInstance().getServiceInstanceId()); + assertNotNull(link.getServiceProxy("testProxyId2").getServiceInstance().getSolutionInfo()); + assertFalse(link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().isEmpty()); + assertEquals("testPrimaryPnfName2", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getPnfName()); + assertEquals("primary", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getRole()); + assertEquals("testSecondaryPnfName2", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getPnfName()); + assertEquals("secondary", link.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getRole()); + + assertNotNull(link2); + assertFalse(link2.getServiceProxies().isEmpty()); + + assertEquals("testServiceInstanceId3", link2.getServiceProxy("testProxyId1").getServiceInstance().getServiceInstanceId()); + assertNotNull(link2.getServiceProxy("testProxyId1").getServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName3", link2.getServiceProxy("testProxyId1").getServiceInstance().getVnfs().get(0).getVnfName()); + + assertEquals("testServiceInstanceId4", link2.getServiceProxy("testProxyId2").getServiceInstance().getServiceInstanceId()); + assertNotNull(link2.getServiceProxy("testProxyId2").getServiceInstance().getSolutionInfo()); + assertFalse(link2.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().isEmpty()); + assertEquals("testPrimaryPnfName4", link2.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getPnfName()); + assertEquals("primary", link2.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(0).getRole()); + assertEquals("testSecondaryPnfName4", link2.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getPnfName()); + assertEquals("secondary", link2.getServiceProxy("testProxyId2").getServiceInstance().getPnfs().get(1).getRole()); + + } + + @Test + public void testProcessSolution_success_3VpnLink_2Solutions(){ + //TODO + } + + @Test + public void testProcessSolution_success_3Allotteds_1Solution(){ + beforeAllottedResource(); + + JSONObject asyncResponse = new JSONObject(); + asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed"); + JSONArray solution1 = new JSONArray(); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId1")))); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName2")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId2")))); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("inventoryType", "cloud").put("solution", new JSONObject() + .put("identifierType", "cloudRegionId").put("identifiers", new JSONArray().put("testCloudRegionId3"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3")))); + + asyncResponse.put("solutions", new JSONObject().put("placementSolutions", new JSONArray().put(solution1)).put("licenseSolutions", new JSONArray())); + + sniroHoming.processSolution(execution, asyncResponse.toString()); + + ServiceInstance si = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0); + + assertFalse(si.getAllottedResources().isEmpty()); + AllottedResource ar = si.getAllottedResources().get(0); + assertNotNull(ar); + assertEquals("testServiceInstanceId1", ar.getParentServiceInstance().getServiceInstanceId()); + assertNotNull(ar.getParentServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName1", ar.getParentServiceInstance().getVnfs().get(0).getVnfName()); + + AllottedResource ar2 = si.getAllottedResources().get(1); + assertNotNull(ar2); + assertEquals("testServiceInstanceId2", ar2.getParentServiceInstance().getServiceInstanceId()); + assertNotNull(ar2.getParentServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName2", ar2.getParentServiceInstance().getVnfs().get(0).getVnfName()); + + AllottedResource ar3 = si.getAllottedResources().get(2); + assertNotNull(ar3); + assertNotNull(ar3.getParentServiceInstance().getSolutionInfo()); + assertEquals("testCloudRegionId3", ar3.getParentServiceInstance().getSolutionInfo().getTargetedCloudRegion().getLcpCloudRegionId()); + } + + @Test + public void testProcessSolution_success_3Allotteds1Vnf_1Solution(){ + beforeVnf(); + beforeAllottedResource(); + + JSONObject asyncResponse = new JSONObject(); + asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed"); + JSONArray solution1 = new JSONArray(); + JSONArray licenseSolution = new JSONArray(); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId1").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId1"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName1")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli1")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId1")))); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId2").put("inventoryType", "service").put("solution", new JSONObject() + .put("identifierType", "serviceInstanceId").put("identifiers", new JSONArray().put("testServiceInstanceId2"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "vnfHostName").put("value", "testVnfHostName2")) + .put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")).put(new JSONObject().put("key", "aicVersion").put("value", "3")) + .put(new JSONObject().put("key", "vnfId").put("value", "testVnfId1")).put(new JSONObject().put("key", "cloudRegionId").put("value", "testCloudRegionId2")))); + solution1.put(new JSONObject().put("serviceResourceId", "testAllottedResourceId3").put("inventoryType", "cloud").put("solution", new JSONObject() + .put("identifierType", "cloudRegionId").put("identifiers", new JSONArray().put("testCloudRegionId3"))) + .put("assignmentInfo", new JSONArray().put(new JSONObject().put("key", "isRehome").put("value", "True")) + .put(new JSONObject().put("key", "cloudOwner").put("value", "aic")).put(new JSONObject().put("key", "aicClli").put("value", "testAicClli2")) + .put(new JSONObject().put("key", "aicVersion").put("value", "3")))); + + licenseSolution.put( + new JSONObject().put("serviceResourceId", "testVnfId1").put("entitlementPoolUUID", new JSONArray().put("f1d563e8-e714-4393-8f99-cc480144a05e").put("j1d563e8-e714-4393-8f99-cc480144a05e")) + .put("licenseKeyGroupUUID", new JSONArray().put("s1d563e8-e714-4393-8f99-cc480144a05e").put("b1d563e8-e714-4393-8f99-cc480144a05e"))); + + asyncResponse.put("solutions", new JSONObject().put("placementSolutions", new JSONArray().put(solution1)).put("licenseSolutions", licenseSolution)); + + sniroHoming.processSolution(execution, asyncResponse.toString()); + + ServiceInstance si = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0); + + assertFalse(si.getAllottedResources().isEmpty()); + AllottedResource ar = si.getAllottedResources().get(0); + assertNotNull(ar); + assertEquals("testServiceInstanceId1", ar.getParentServiceInstance().getServiceInstanceId()); + assertNotNull(ar.getParentServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName1", ar.getParentServiceInstance().getVnfs().get(0).getVnfName()); + + AllottedResource ar2 = si.getAllottedResources().get(1); + assertNotNull(ar2); + assertEquals("testServiceInstanceId2", ar2.getParentServiceInstance().getServiceInstanceId()); + assertNotNull(ar2.getParentServiceInstance().getSolutionInfo()); + assertEquals("testVnfHostName2", ar2.getParentServiceInstance().getVnfs().get(0).getVnfName()); + + AllottedResource ar3 = si.getAllottedResources().get(2); + assertNotNull(ar3); + assertNotNull(ar3.getParentServiceInstance().getSolutionInfo()); + assertEquals("testCloudRegionId3", ar3.getParentServiceInstance().getSolutionInfo().getTargetedCloudRegion().getLcpCloudRegionId()); + + GenericVnf vnf = si.getVnfs().get(0); + assertNotNull(vnf); + assertNotNull(vnf.getLicense()); + assertEquals(2, vnf.getLicense().getEntitlementPoolUuids().size()); + assertEquals("s1d563e8-e714-4393-8f99-cc480144a05e", vnf.getLicense().getLicenseKeyGroupUuids().get(0)); + + } + + @Test + public void testProcessSolution_success_1Vnf_1Solution(){ + beforeVnf(); + + JSONObject asyncResponse = new JSONObject(); + asyncResponse.put("transactionId", "testRequestId").put("requestId", "testRequestId").put("requestState", "completed"); + JSONArray licenseSolution = new JSONArray(); + + licenseSolution.put( + new JSONObject().put("serviceResourceId", "testVnfId1").put("entitlementPoolUUID", new JSONArray().put("f1d563e8-e714-4393-8f99-cc480144a05e").put("j1d563e8-e714-4393-8f99-cc480144a05e")) + .put("licenseKeyGroupUUID", new JSONArray().put("s1d563e8-e714-4393-8f99-cc480144a05e").put("b1d563e8-e714-4393-8f99-cc480144a05e"))); + + asyncResponse.put("solutions", new JSONObject().put("licenseSolutions", licenseSolution)); + + sniroHoming.processSolution(execution, asyncResponse.toString()); + + ServiceInstance si = execution.getGeneralBuildingBlock().getCustomer().getServiceSubscription().getServiceInstances().get(0); + + GenericVnf vnf = si.getVnfs().get(0); + assertNotNull(vnf); + assertNotNull(vnf.getLicense()); + assertEquals(2, vnf.getLicense().getEntitlementPoolUuids().size()); + assertEquals(2, vnf.getLicense().getLicenseKeyGroupUuids().size()); + assertEquals("f1d563e8-e714-4393-8f99-cc480144a05e", vnf.getLicense().getEntitlementPoolUuids().get(0)); + assertEquals("s1d563e8-e714-4393-8f99-cc480144a05e", vnf.getLicense().getLicenseKeyGroupUuids().get(0)); + + + } + + @Test(expected = BpmnError.class) + public void testCallSniro_error_0Resources() throws BadResponseException, JsonProcessingException{ + + sniroHoming.callSniro(execution); + + verify(sniroClient, times(0)).postDemands(isA(SniroManagerRequest.class)); + } + + @Test(expected = BpmnError.class) + public void testCallSniro_error_badResponse() throws BadResponseException, JsonProcessingException{ + beforeAllottedResource(); + + mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"\", \"requestStatus\": \"failed\"}"; + stubFor(post(urlEqualTo("/sniro/api/placement/v2")) + .willReturn(aResponse().withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody(mockResponse))); + + sniroHoming.callSniro(execution); + + verify(sniroClient, times(1)).postDemands(isA(SniroManagerRequest.class)); + } + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java new file mode 100644 index 0000000000..793a8c04e3 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAICheckVnfInMaintBBTest.java @@ -0,0 +1,59 @@ +/*- + * ============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.common; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.BaseTest; + +public class AAICheckVnfInMaintBBTest extends BaseTest{ + + @Ignore + @Test + public void sunnyDayAAICheckVnfInMaintBBTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAICheckVnfInMaintBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AAICheckVnfInMaintBB", "Task_CheckVnfInMaint", "End_AAICheckVnfInMaintBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAAISetVnfInMaintBBTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks).checkVnfInMaintFlag(any(BuildingBlockExecution.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("AAICheckVnfInMaintBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("Start_AAICheckVnfInMaintBB", "Task_CheckVnfInMaint") + .hasNotPassed("End_AAICheckVnfInMaintBB"); + assertThat(processInstance).isEnded(); + } + + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java new file mode 100644 index 0000000000..890fd6b224 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAISetVnfInMaintBBTest.java @@ -0,0 +1,59 @@ +/*- + * ============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.common; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.BaseTest; + +public class AAISetVnfInMaintBBTest extends BaseTest { + + @Ignore + @Test + public void sunnyDayAAISetVnfInMaintBBTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAISetVnfInMaintBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AAISetVnfInMaintBB", "Task_SetInMaint", "End_AAISetVnfInMaintBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAAISetVnfInMaintBBTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks).modifyVnfInMaintFlag(any(BuildingBlockExecution.class), any(boolean.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("AAISetVnfInMaintBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("Start_AAISetVnfInMaintBB", "Task_SetInMaint") + .hasNotPassed("End_AAISetVnfInMaintBB"); + assertThat(processInstance).isEnded(); + } + + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java new file mode 100644 index 0000000000..c19919601d --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/AAIUnsetVnfInMaintBBTest.java @@ -0,0 +1,59 @@ +/*- + * ============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.common; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.BaseTest; + +public class AAIUnsetVnfInMaintBBTest extends BaseTest { + + @Test + @Ignore + public void sunnyDayAAISetVnftInMaintBBTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AAIUnsetVnfInMaintBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AAIUnsetVnfInMaintBB", "Task_UnsetInMaint", "End_AAIUnsetVnfInMaintBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAAISetVnfInMaintBBTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks).modifyVnfInMaintFlag(any(BuildingBlockExecution.class), any(boolean.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("AAIUnsetVnfInMaintBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("Start_AAIUnsetVnfInMaintBB", "Task_UnsetInMaint") + .hasNotPassed("End_AAIUnsetVnfInMaintBB"); + assertThat(processInstance).isEnded(); + } + + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java new file mode 100644 index 0000000000..f7c6852228 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/common/SDNOHealthCheckBBTest.java @@ -0,0 +1,59 @@ +/*- + * ============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.common; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.BaseTest; + +public class SDNOHealthCheckBBTest extends BaseTest { + + @Test + @Ignore + public void sunnyDaySDNOHealthCheckTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("SDNOVnfHealthCheckBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_SDNOHealthCheckBB", "Task_SDNOHealthCheck", "End_SDNOHealthCheckBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDaySDNOHealthCheckTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdnoHealthCheckTasks).sdnoHealthCheck(any(BuildingBlockExecution.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("SDNOVnfHealthCheckBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("Start_SDNOHealthCheckBB", "Task_SDNOHealthCheck") + .hasNotPassed("End_SDNOHealthCheckBB"); + assertThat(processInstance).isEnded(); + } + + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java new file mode 100644 index 0000000000..ee02f293f7 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/process/WorkflowActionBBTest.java @@ -0,0 +1,143 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.process; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Ignore; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; + +@Ignore +public class WorkflowActionBBTest extends BaseBPMNTest { + + @Test + public void sunnyDaySuccessIsTopLevelFlow() throws InterruptedException, IOException { + variables.put("isTopLevelFlow", true); + variables.put("completed", true); + + Map<String, String> map = new HashMap<>(); + map.put("handlingCode", "Success"); + mockSubprocess("ExecuteBuildingBlock", "Mocked ExecuteBuildingBlock", "GenericStub", map); + mockSubprocess("CompleteMsoProcess", "Mocked CompleteMsoProcess", "GenericStub"); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "ExclusiveGateway_isTopLevelFlow", "Task_SendSync", + "Task_SelectBB", "Call_ExecuteBB", "ExclusiveGateway_Finished", "ExclusiveGateway_isTopLevelFlowCompleted", "Task_SetupCompleteMsoProcess", "Call_CompleteMsoProcess", + "End_WorkflowActionBB"); + assertThat(pi).isEnded(); + } + + @Test + public void sunnyDaySuccessNotTopLevelFlow() throws InterruptedException, IOException { + variables.put("isTopLevelFlow", false); + variables.put("completed", true); + + Map<String, String> map = new HashMap<>(); + map.put("handlingCode", "Success"); + mockSubprocess("ExecuteBuildingBlock", "Mocked ExecuteBuildingBlock", "GenericStub", map); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "ExclusiveGateway_isTopLevelFlow", + "Task_SelectBB", "Call_ExecuteBB", "ExclusiveGateway_Finished", "ExclusiveGateway_isTopLevelFlowCompleted", "End_WorkflowActionBB"); + assertThat(pi).isEnded(); + } + + @Test + public void sunnyDayRollback() throws InterruptedException, IOException { + variables.put("isTopLevelFlow", false); + variables.put("isRollbackNeeded", false); + + Map<String, String> map = new HashMap<>(); + map.put("handlingCode", "Rollback"); + mockSubprocess("ExecuteBuildingBlock", "Mocked ExecuteBuildingBlock", "GenericStub", map); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "ExclusiveGateway_isTopLevelFlow", + "Task_SelectBB", "Call_ExecuteBB", "ExclusiveGateway_Finished", "Task_RollbackExecutionPath", "Task_UpdateRequestToFailed", "End_RollbackFailed"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAbort() throws Exception { + variables.put("isTopLevelFlow", true); + variables.put("completed", false); + + Map<String, String> map = new HashMap<>(); + map.put("handlingCode", "Abort"); + + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(workflowActionBBTasks).abortCallErrorHandling(any(DelegateExecution.class)); + mockSubprocess("ExecuteBuildingBlock", "Mocked ExecuteBuildingBlock", "GenericStub", map); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "ExclusiveGateway_isTopLevelFlow", "Task_SendSync", + "Task_SelectBB", "Call_ExecuteBB", "ExclusiveGateway_Finished", "ExclusiveGateway_isTopLevelFlowAbort", "Task_AbortAndCallErrorHandling", "ErrorStart", + "Task_UpdateDb", "ErrorEnd"); + assertThat(pi).isEnded(); + } + + @Test + public void retrieveBBExecutionListerrorHandling() throws Exception { + variables.put("isTopLevelFlow", true); + variables.put("sentSyncResponse", false); + doThrow(new IllegalStateException("TESTING ERRORS")).when(workflowAction).selectExecutionList(any(DelegateExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "StartEvent_runtimeError", "ServiceTask_HandleRuntimeError", "EndEvent__runtimeError", "SubProcess_0rze15o"); + assertThat(pi).isEnded(); + } + + @Test + public void errorCatchSubprocessHandlingTest() throws Exception { + variables.put("isTopLevelFlow", true); + variables.put("sentSyncResponse", false); + doThrow(new IllegalStateException("TESTING ERRORS")).when(workflowAction).selectExecutionList(any(DelegateExecution.class)); + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(workflowAction).handleRuntimeException(any(DelegateExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList", "StartEvent_runtimeError", "ServiceTask_HandleRuntimeError", "SubProcess_0fuugr9", "ErrorStart", "ExclusiveGateway_10q79b6", "Task_SendSyncAckError", "Task_UpdateDb", "ErrorEnd", "SubProcess_18226x4"); + assertThat(pi).isEnded(); + } + + @Test + public void errorCatchBpmnSubprocessHandlingTest() throws Exception { + variables.put("isTopLevelFlow", true); + variables.put("sentSyncResponse", false); + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(workflowActionBBTasks).selectBB(any(DelegateExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("WorkflowActionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_WorkflowActionBB", "Task_RetrieveBBExectuionList","ExclusiveGateway_isTopLevelFlow","Task_SendSync","Task_SelectBB", "ErrorStart", "ExclusiveGateway_10q79b6", "Task_SendSyncAckError", "Task_UpdateDb", "ErrorEnd", "SubProcess_18226x4"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java new file mode 100644 index 0000000000..da26b6e6a0 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ActivateNetworkBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayActivateNetwork_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("activateNetwork_startEvent","Activate_Network_SDNC_ServiceTask","Activate_Network_AAI_ServiceTask","activateNetwork_EndEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayActivateNetwork_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusActiveNetwork(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("activateNetwork_startEvent","Activate_Network_SDNC_ServiceTask","Activate_Network_AAI_ServiceTask") + .hasNotPassed("activateNetwork_EndEvent"); + assertThat(pi).isEnded().hasVariables("gBuildingBlockExecution"); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java new file mode 100644 index 0000000000..00eaabbfc5 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateNetworkCollectionBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ActivateNetworkCollectionBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayActivateNetworkCollection_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkCollectionBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("activateNetworkCollection_startEvent","Activate_Network_Collection_AAI_ServiceTask","activateNetworkCollection_EndEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayActivateNetworkCollection_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusActiveNetworkCollection(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateNetworkCollectionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("activateNetworkCollection_startEvent") + .hasNotPassed("activateNetworkCollection_EndEvent"); + assertThat(pi).isEnded().hasVariables("gBuildingBlockExecution"); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java new file mode 100644 index 0000000000..4739a56f07 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateServiceInstanceBBTest.java @@ -0,0 +1,41 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; + +import java.io.IOException; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; + +public class ActivateServiceInstanceBBTest extends BaseBPMNTest{ + + @Test + public void sunnyDaySDNC() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateServiceInstanceBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_ActivateServiceInstanceBB", "Task_NoOpServiceInstance", + "Task_UpdateServiceOrchestrationStatusToActive", "End_ActivateServiceInstanceBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java new file mode 100644 index 0000000000..dcf9d7f228 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVfModuleBBTest.java @@ -0,0 +1,56 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ActivateVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDay() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("ActivateVfModuleBB_Start", "ActivateVfModule", + "UpdateVfModuleActiveStatus", "ActivateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDay() throws Exception { + doThrow(BpmnError.class).when(aaiUpdateTasks).updateOrchestrationStatusActivateVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("ActivateVfModuleBB_Start", "ActivateVfModule", "UpdateVfModuleActiveStatus") + .hasNotPassed("ActivateVfModuleBB_End"); + assertThat(pi).isEnded().hasVariables("gBuildingBlockExecution"); + + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java new file mode 100644 index 0000000000..0578286153 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVnfBBTest.java @@ -0,0 +1,41 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; + +import java.io.IOException; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; + +public class ActivateVnfBBTest extends BaseBPMNTest{ + @Test + public void sunnyDay() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_ActivateVnfBB", "Task_SDNCAdapterVnfTopologyActivate", + "Task_ActivateOrchestrationStatusVnf", "End_ActivateVnfBB"); + assertThat(pi).isEnded(); + } + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java new file mode 100644 index 0000000000..7673652f48 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ActivateVolumeGroupBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ActivateVolumeGroupBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("ActivateVolumeGroupBB_Start", "ActivateVolumeGroup", "ActivateVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignVolumeGroup_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusActiveVolumeGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ActivateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("ActivateVolumeGroupBB_Start", "ActivateVolumeGroup") + .hasNotPassed("ActivateVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java new file mode 100644 index 0000000000..14cac8343e --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java @@ -0,0 +1,57 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.test.Deployment; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + + +public class AssignNetwork1802BBTest extends BaseBPMNTest{ + @Test + @Deployment(resources = { "subprocess/AssignNetworkRollbackBB.bpmn"}) + public void sunnyDayAssignNetwork_Test() throws InterruptedException { + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("AssignNetworkBB_start","ServiceTask_get_cloud_region","ServiceTask_assign_network_sdnc","ServiceTask_assign_network_aai","AssignNetworkBB_end"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignNetwork_Test() throws Exception { + + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedNetwork(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("AssignNetworkBB_start", "ServiceTask_get_cloud_region", "ServiceTask_assign_network_sdnc", "ServiceTask_assign_network_aai") + .hasNotPassed("AssignNetworkBB_end"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java new file mode 100644 index 0000000000..1e66c55cb2 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetworkBBTest.java @@ -0,0 +1,56 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.test.Deployment; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class AssignNetworkBBTest extends BaseBPMNTest{ + @Test + @Deployment(resources = { "subprocess/AssignNetworkRollbackBB.bpmn"}) + public void sunnyDayAssignNetwork_Test() throws InterruptedException { + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetworkBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("AssignNetworkBB_start","networkFoundByName_ExclusiveGateway","ServiceTask_put_network_in_AAI","ServiceTask_connect_to_Tenant","ServiceTask_connect_to_CloudRegion","ServiceTask_connect_to_NCIG","ServiceTask_connect_to_NCSI","ServiceTask_get_cloud_region","ServiceTask_assign_network_sdnc","ServiceTask_assign_network_aai","AssignNetworkBB_end"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignNetwork_Test() throws Exception { + + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedNetwork(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("AssignNetworkBB_start", "networkFoundByName_ExclusiveGateway", "ServiceTask_put_network_in_AAI","ServiceTask_connect_to_Tenant","ServiceTask_connect_to_CloudRegion","ServiceTask_connect_to_NCIG","ServiceTask_connect_to_NCSI", "ServiceTask_get_cloud_region", "ServiceTask_assign_network_sdnc", "ServiceTask_assign_network_aai") + .hasNotPassed("AssignNetworkBB_end"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java new file mode 100644 index 0000000000..e7551415f9 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignServiceInstanceBBTest.java @@ -0,0 +1,42 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; + +import java.io.IOException; + +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; + +public class AssignServiceInstanceBBTest extends BaseBPMNTest{ + + @Test + public void sunnyDaySDNC() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignServiceInstanceBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AssignServiceInstanceBB", "Task_CreateServiceInstance", + "Task_CreateProject", "Task_CreateOwningEntity", "Task_AssignServiceInstance", + "Task_UpdateServiceOstatusToAssigned", "End_AssignServiceInstanceBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java new file mode 100644 index 0000000000..2645c794a7 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVfModuleBBTest.java @@ -0,0 +1,57 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class AssignVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayAssignVfModule_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("AssignVfModuleBB_Start", + "CreateVfModule", + "ConnectVfModuleToVolumeGroup", + "AssignVfModule", + "UpdateVfModuleStatus", + "AssignVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignVfModule_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks).createVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("AssignVfModuleBB_Start", "CreateVfModule") + .hasNotPassed("ConnectVfModuleToVolumeGroup", "AssignVfModule", "UpdateVfModuleStatus", "AssignVfModuleBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java new file mode 100644 index 0000000000..8dc23eba0f --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java @@ -0,0 +1,58 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class AssignVnfBBTest extends BaseBPMNTest { + @Test + public void sunnyDayAssignVnfBBTest() throws InterruptedException, IOException { + variables.put("callHoming", true); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AssignVnfBB", "Task_CreateVnf", "Task_createPlatform", "Task_createLineOfBusiness", "Task_createInstanceGroups", + "Task_callHoming", "Task_SDNCAdapterVnfTopologyAssign", "Task_UpdateVnfOrchestrationStatusAssigned", + "End_AssignVnfBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignVnfBBTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks) + .createVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_AssignVnfBB", "Task_CreateVnf").hasNotPassed( + "Task_createPlatform", "Task_createLineOfBusiness", "Task_createInstanceGroups", "Task_SDNCAdapterVnfTopologyAssign", + "Task_UpdateVnfOrchestrationStatusAssigned", "End_AssignVnfBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java new file mode 100644 index 0000000000..32a803e44e --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVolumeGroupBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class AssignVolumeGroupBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("AssignVolumeGroupBB_Start", "AssignVolumeGroup", "AssignVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignVolumeGroup_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks).createVolumeGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("AssignVolumeGroupBB_Start", "AssignVolumeGroup") + .hasNotPassed("AssignVolumeGroupBB_End"); + assertThat(pi).isEnded();; + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelServiceInstanceBBTest.java new file mode 100644 index 0000000000..5af503e001 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelServiceInstanceBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ChangeModelServiceInstanceBBTest extends BaseBPMNTest{ + @Test + public void changeModelVnfBBTest() { + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("ChangeModelServiceInstanceBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted().hasPassedInOrder("ChangeModelServiceInstance_Start" ,"SDNCChangeModelServiceInstance", "AAIUpdateModelServiceInstance", "ChangeModelServiceInstance_End"); + assertThat(processInstance).isEnded(); + } + + @Test + public void changeModelVnfBBExceptionTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncChangeAssignTasks).changeModelServiceInstance(any(BuildingBlockExecution.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("ChangeModelServiceInstanceBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("ChangeModelServiceInstance_Start", "SDNCChangeModelServiceInstance") + .hasNotPassed("AAIUpdateModel", "ChangeModelServiceInstance_End"); + assertThat(processInstance).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java new file mode 100644 index 0000000000..4720fc019c --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVfModuleBBTest.java @@ -0,0 +1,54 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ChangeModelVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayChangeModelVfModuleTest() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ChangeModelVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("ChangeModelVfModuleBB_Start", "ChangeModelVfModule", "UpdateVfModuleModel", "ChangeModelVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayChangeModelVfModuleTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncChangeAssignTasks).changeAssignModelVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ChangeModelVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("ChangeModelVfModuleBB_Start", "ChangeModelVfModule") + .hasNotPassed("ChangeModelVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVnfBBTest.java new file mode 100644 index 0000000000..78bf15febe --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ChangeModelVnfBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class ChangeModelVnfBBTest extends BaseBPMNTest{ + @Test + public void changeModelVnfBBTest() { + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("ChangeModelVnfBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted().hasPassedInOrder("ChangeModelVnf_Start" ,"SDNCChangeModel", "AAIUpdateModel", "ChangeModelVnf_End"); + assertThat(processInstance).isEnded(); + } + + @Test + public void changeModelVnfBBExceptionTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncChangeAssignTasks).changeModelVnf(any(BuildingBlockExecution.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("ChangeModelVnfBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted() + .hasPassedInOrder("ChangeModelVnf_Start", "SDNCChangeModel") + .hasNotPassed("AAIUpdateModel", "ChangeModelVnf_End"); + assertThat(processInstance).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java new file mode 100644 index 0000000000..7cefd5861e --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateCustomerBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class CreateCustomerBBTest extends BaseBPMNTest{ + @Test + public void createCustomerBBTest() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateCustomerBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("CreateCustomerBB_Start", "CreateCustomerAAI", "CreateCustomerBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void createCustomerBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks).createCustomer(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateCustomerBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("CreateCustomerBB_Start", "CreateCustomerAAI") + .hasNotPassed("CreateCustomer_End"); + assertThat(pi).isEnded(); + } +} + diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java new file mode 100644 index 0000000000..cb3ab32884 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java @@ -0,0 +1,54 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class CreateNetworkBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayCreateNetwork_Test() throws InterruptedException { + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("createNetwork_startEvent", "QueryNetworkById_ServiceTask", "ServiceTask_get_cloud_region", "QueryVpnBinding_ServiceTask", "QueryNetworkPolicy_ServiceTask", "QueryNetworkTableRef_ServiceTask", "Create_Network_ServiceTask", "Update_Network_AAI_ServiceTask", "createNetwork_EndEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateNetwork_Test() throws Exception { + + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(createNetwork).buildCreateNetworkRequest(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("createNetwork_startEvent","QueryNetworkById_ServiceTask") + .hasNotPassed("End Flow"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java new file mode 100644 index 0000000000..bd285f11e1 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkCollectionBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class CreateNetworkCollectionBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayCreateNetworkCollection_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkCollectionBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("createNetworkCollection_startEvent", "BuildName_ServiceTask", "ServiceTask_create_NetworkCollection", "ServiceTask_create_NetworkCollectionInstanceGroup", "ServiceTask_Connect_Collection_to_InstanceGroup", "ServiceTask_Connect_Collection_to_ServiceInstance", "createNetworkCollection_EndEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateNetworkCollection_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiCreateTasks).createNetworkCollectionInstanceGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkCollectionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("createNetworkCollection_startEvent", "BuildName_ServiceTask", "ServiceTask_create_NetworkCollection") + .hasNotPassed("createNetworkCollection_EndEvent"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java new file mode 100644 index 0000000000..a3c6a820bd --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java @@ -0,0 +1,94 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class CreateVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayCreateVfModule_Test() throws InterruptedException { + mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("CreateVfModuleBB_Start", + "QueryVnf", + "QueryVfModule", + "CreateVfModule", + "VnfAdapter", + "UpdateVfModuleStatus", + "CreateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateVfModuleSDNCQueryVnfError_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks).queryVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf") + .hasNotPassed("QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateVfModuleSDNCQueryVnfModuleError_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks).queryVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule") + .hasNotPassed("CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateVfModuleVnfAdapterCreateError_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterCreateTasks).createVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule") + .hasNotPassed("VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateVfModuleUpdateVfModuleStatusError_Test() throws Exception { + mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusCreatedVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus") + .hasNotPassed("CreateVfModuleBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java new file mode 100644 index 0000000000..980e609e97 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java @@ -0,0 +1,55 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class CreateVolumeGroupBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayCreateVolumeGroup_Test() throws InterruptedException { + mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted(); + assertThat(pi).isEnded(); + assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter","UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); + } + + @Test + public void rainyDayCreateVolumeGroup_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterCreateTasks).createVolumeGroupRequest(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted(); + assertThat(pi).isEnded(); + assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter") + .hasNotPassed("Vnf_Adapter", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); + } +} + diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java new file mode 100644 index 0000000000..fd8cb9f15d --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateNetworkBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeactivateNetworkBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayDeactivateNetworkBB_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("DeactivateNetworkBB_Start", "DeactivateNetworkSDNC", "DeactivateNetworkAAI", "DeactivateNetworkBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayDeactivateNetworkBB_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncDeactivateTasks).deactivateNetwork(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("DeactivateNetworkBB_Start", "DeactivateNetworkSDNC") + .hasNotPassed("DeactivateNetworkAAI", "DeactivateNetworkBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java new file mode 100644 index 0000000000..6c7aedf48a --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateServiceInstanceBBTest.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +/** + * Unit test cases for DeActivateServiceInstanceTest.bpmn + */ +public class DeactivateServiceInstanceBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayDeactivateServiceInstanceSDNC() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateServiceInstanceBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_DeactivateServiceInstanceBB", "Task_DeactivateServiceInstance_SDNC", "Task_DeactivateServiceInstance_AAI", "End_DeactivateServiceInstanceBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java new file mode 100644 index 0000000000..b6e0812dd7 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVfModuleBBTest.java @@ -0,0 +1,56 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeactivateVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDay() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("DeactivateVfModuleBB_Start", "DeactivateVfModule", + "UpdateVfModuleDeactivateStatus", "DeactivateVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDay() throws Exception { + doThrow(BpmnError.class).when(aaiUpdateTasks).updateOrchestrationStatusDeactivateVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("DeactivateVfModuleBB_Start", "DeactivateVfModule", "UpdateVfModuleDeactivateStatus") + .hasNotPassed("DeActivateVfModuleBB_End"); + assertThat(pi).isEnded(); + + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java new file mode 100644 index 0000000000..20edc62b64 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVnfBBTest.java @@ -0,0 +1,66 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeactivateVnfBBTest extends BaseBPMNTest{ + @Test + public void sunnyDay() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_DeactivateVnfBB","Task_SDNCAdapterVnfTopologyDeactivate", + "Task_DeactivateOrchestrationStatusVnf", "End_DeactivateVnfBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayDeactivateVnfSDNCError_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncDeactivateTasks).deactivateVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_DeactivateVnfBB", "Task_SDNCAdapterVnfTopologyDeactivate") + .hasNotPassed("Task_DeactivateOrchestrationStatusVnf", "End_DeactivateVnfBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayDeactivateVnfAAIError_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_DeactivateVnfBB", "Task_SDNCAdapterVnfTopologyDeactivate","Task_DeactivateOrchestrationStatusVnf") + .hasNotPassed("End_DeactivateVnfBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java new file mode 100644 index 0000000000..e0f3cb2c48 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeactivateVolumeGroupBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeactivateVolumeGroupBBTest extends BaseBPMNTest { + @Test + public void sunnyDayAssignVolumeGroup_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("DeactivateVolumeGroupBB_Start", "DeactivateVolumeGroup", "DeactivateVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignVolumeGroup_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusCreatedVolumeGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeactivateVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("DeactivateVolumeGroupBB_Start", "DeactivateVolumeGroup") + .hasNotPassed("DeactivateVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java new file mode 100644 index 0000000000..b6b58eb3eb --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeleteNetworkBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayDeleteNetwork_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("deleteNetwork_startEvent", "deleteNetworkAIC", "updateNetworkAAI", "deleteNetwork_endEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayDeleteNetwork_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(networkAdapterDeleteTasks).deleteNetwork(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("deleteNetwork_startEvent", "deleteNetworkAIC") + .hasNotPassed("updateNetworkAAI", "deleteNetwork_endEvent"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java new file mode 100644 index 0000000000..c8f81c1057 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteNetworkCollectionBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeleteNetworkCollectionBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayCreateNetworkCollection_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkCollectionBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("deleteNetworkCollection_startEvent", "ServiceTask_delete_NetworkCollectionInstanceGroup", "ServiceTask_delete_NetworkCollection", "deleteNetworkCollection_EndEvent"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayCreateNetworkCollection_Test() throws Exception { + + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiDeleteTasks).deleteInstanceGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteNetworkCollectionBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("deleteNetworkCollection_startEvent") + .hasNotPassed("deleteNetworkCollection_EndEvent"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java new file mode 100644 index 0000000000..098d9a5c05 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java @@ -0,0 +1,55 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import java.io.IOException; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeleteVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDay() throws InterruptedException, IOException { + mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub"); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("DeleteVfModuleBB_Start", "DeleteVfModuleVnfAdapter", "VnfAdapter", + "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDay() throws Exception { + doThrow(BpmnError.class).when(vnfAdapterDeleteTasks).deleteVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("DeleteVfModuleBB_Start", "DeleteVfModuleVnfAdapter") + .hasNotPassed("VnfAdapter", "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java new file mode 100644 index 0000000000..d2f4db5d5c --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java @@ -0,0 +1,52 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class DeleteVolumeGroupBBTest extends BaseBPMNTest { + @Test + public void sunnyDayDeleteVolumeGroup_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI", "DeleteVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayDeleteVolumeGroup_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedVolumeGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI") + .hasNotPassed("DeleteVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java new file mode 100644 index 0000000000..51f5f723ad --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ExecuteBuildingBlockTest.java @@ -0,0 +1,113 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doThrow; + +import java.util.List; + +import org.camunda.bpm.engine.ManagementService; +import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.camunda.bpm.engine.management.JobDefinition; +import org.camunda.bpm.engine.runtime.Job; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.camunda.bpm.engine.task.Task; +import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.db.catalog.beans.OrchestrationStatusValidationDirective; +import org.springframework.beans.factory.annotation.Autowired; + +public class ExecuteBuildingBlockTest extends BaseBPMNTest { + @Autowired + private TaskService taskService; + @Autowired + private ManagementService managementService; + + @Test + public void test_sunnyDayExecuteBuildingBlock_silentSuccess() throws Exception { + variables.put("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ExecuteBuildingBlock", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_ExecuteBuildingBlock", "Task_BBInputSetup", "StatusPolicy", "CheckOrchestrationStatusValidationResults", "End_ExecuteBuildingBlock") + .hasNotPassed("Call_BBToExecute", "ErrorStart", "Task_QueryRainyDayTable", "ExclusiveGateway_1aonzik", "ExclusiveGateway_1aonzik", "ErrorEnd2", "Task_SetRetryTimer"); + assertThat(pi).isEnded(); + } + + @Test + public void test_rainyDayExecuteBuildingBlock_rollbackOrAbort() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(bbInputSetup).execute(any(DelegateExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ExecuteBuildingBlock", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_ExecuteBuildingBlock", "Task_BBInputSetup", "BoundaryEvent_0i3q236", "Task_QueryRainyDayTable", "ExclusiveGateway_1aonzik", "ErrorEnd2") + .hasNotPassed("StatusPolicy", "CheckOrchestrationStatusValidationResults", "Call_BBToExecute", "End_ExecuteBuildingBlock", "ExclusiveGateway_0ey4zpt", "Task_SetRetryTimer"); + assertThat(pi).isEnded(); + } + + @Test + public void test_rainyDayExecuteBuildingBlock_retryNoRetriesLeft() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(bbInputSetup).execute(any(DelegateExecution.class)); + + variables.put("handlingCode", "Retry"); + variables.put("RetryCount", 5); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ExecuteBuildingBlock", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_ExecuteBuildingBlock", "Task_BBInputSetup", "BoundaryEvent_0i3q236", "Task_QueryRainyDayTable", "ExclusiveGateway_1aonzik", "ExclusiveGateway_0ey4zpt", "ErrorEnd2") + .hasNotPassed("StatusPolicy", "CheckOrchestrationStatusValidationResults", "Call_BBToExecute", "End_ExecuteBuildingBlock", "Task_SetRetryTimer"); + assertThat(pi).isEnded(); + } + + @Test + @Ignore + public void test_rainyDayExecuteBuildingBlock_retryRetriesLeft() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(bbInputSetup).execute(any(DelegateExecution.class)); + + variables.put("handlingCode", "Retry"); + variables.put("RetryCount", 4); + variables.put("RetryDuration", "PT1S"); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ExecuteBuildingBlock", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted(); + assertThat(pi).isWaitingAt("IntermediateCatchEvent_RetryTimer"); + Job job = managementService.createJobQuery().activityId("IntermediateCatchEvent_RetryTimer").singleResult(); + assertNotNull(job); + managementService.executeJob(job.getId()); + assertThat(pi).isEnded() + .hasPassedInOrder("Start_ExecuteBuildingBlock", "Task_BBInputSetup", "BoundaryEvent_0i3q236", "Task_QueryRainyDayTable", "ExclusiveGateway_1aonzik", "ExclusiveGateway_0ey4zpt", "Task_SetRetryTimer", "EndEvent_1sez2lh") + .hasNotPassed("StatusPolicy", "CheckOrchestrationStatusValidationResults", "Call_BBToExecute", "End_ExecuteBuildingBlock", "ErrorEnd2"); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java new file mode 100644 index 0000000000..ad374e3304 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class UnassignNetwork1802BBTest extends BaseBPMNTest { + @Test + public void sunnyDayAssignNetwork_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_GetL3NetworkById","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","End_UnassignNetworkBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignNetwork_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignNetworkBB).checkRelationshipRelatedTo(any(BuildingBlockExecution.class), eq("vf-module")); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_UnassignNetworkBB", "Task_GetL3NetworkById", "Task_VfModuleRelatioship") + .hasNotPassed("End_UnassignNetworkBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java new file mode 100644 index 0000000000..fd95e00031 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class UnassignNetworkBBTest extends BaseBPMNTest { + @Test + public void sunnyDayAssignNetwork_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB",variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_GetL3NetworkById","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","Task_DeleteNetwork","End_UnassignNetworkBB"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayAssignNetwork_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignNetworkBB).checkRelationshipRelatedTo(any(BuildingBlockExecution.class), eq("vf-module")); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("Start_UnassignNetworkBB", "Task_GetL3NetworkById", "Task_VfModuleRelatioship") + .hasNotPassed("End_UnassignNetworkBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java new file mode 100644 index 0000000000..2145cc7a14 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignServiceInstanceBBTest.java @@ -0,0 +1,44 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; + +import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.common.DelegateExecutionImpl; + +public class UnassignServiceInstanceBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayUnassignServiceInstanceSDNC() throws InterruptedException { + BuildingBlockExecution bbe = new DelegateExecutionImpl(new ExecutionImpl()); + + variables.put("gBuildingBlockExecution", bbe); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignServiceInstanceBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignServiceInstanceBB", "Task_SdncUnassignServiceInstance", "Task_AAIDeleteServiceInstance", "End_UnassignServiceInstanceBB"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java new file mode 100644 index 0000000000..59fcd32367 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVfModuleBBTest.java @@ -0,0 +1,66 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class UnassignVfModuleBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayUnassignVfModule_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("UnassignVfModuleBB_Start", + "UnassignVfModule", + "DeleteVfModule", + "UnassignVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayUnassignVfModuleAAIDeleteFailed_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiDeleteTasks).deleteVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("UnassignVfModuleBB_Start", "UnassignVfModule", "DeleteVfModule") + .hasNotPassed("UnassignVfModuleBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayUnassignVfModuleSDNCUnassignFailed_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncUnassignTasks).unassignVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVfModuleBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("UnassignVfModuleBB_Start", "UnassignVfModule") + .hasNotPassed("DeleteVfModule", "UnassignVfModuleBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java new file mode 100644 index 0000000000..666cd87273 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVnfBBTest.java @@ -0,0 +1,77 @@ +/*- + * ============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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class UnassignVnfBBTest extends BaseBPMNTest{ + @Test + public void sunnyDayUnassignVnf_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("UnassignVnfBB_Start", + "UnassignVnf", + "DeleteVnfInstanceGroups", + "DeleteVnf", + "UnassignVnfBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayUnassignVnfInstanceGroupsDeleteFailed_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignVnf).deleteInstanceGroups(any(BuildingBlockExecution.class)); //.deleteVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("UnassignVnfBB_Start", "UnassignVnf", "DeleteVnfInstanceGroups") + .hasNotPassed("DeleteVnf","UnassignVnfBB_End"); + assertThat(pi).isEnded().hasVariables("gBuildingBlockExecution"); + } + + @Test + public void rainyDayUnassignVnfAAIDeleteFailed_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiDeleteTasks).deleteVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("UnassignVnfBB_Start", "UnassignVnf", "DeleteVnfInstanceGroups","DeleteVnf") + .hasNotPassed("UnassignVnfBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayUnassignVnfSDNCUnassignFailed_Test() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncUnassignTasks).unassignVnf(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVnfBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("UnassignVnfBB_Start", "UnassignVnf") + .hasNotPassed("DeleteVnfInstanceGroups","DeleteVnf", "UnassignVnfBB_End"); + assertThat(pi).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java new file mode 100644 index 0000000000..46c25c13ac --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignVolumeGroupBBTest.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + +public class UnassignVolumeGroupBBTest extends BaseBPMNTest { + @Test + public void sunnyDayUnassignVolumeGroup_Test() throws InterruptedException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("UnassignVolumeGroupBB_Start", "UnassignVolumeGroup", "UnassignVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + + @Test + public void rainyDayUnassignVolumeGroup_Test() throws InterruptedException { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiDeleteTasks).deleteVolumeGroup(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignVolumeGroupBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted() + .hasPassedInOrder("UnassignVolumeGroupBB_Start", "UnassignVolumeGroup") + .hasNotPassed("UnassignVolumeGroupBB_End"); + assertThat(pi).isEnded(); + } + +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java new file mode 100644 index 0000000000..853f713bd1 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + + +public class UpdateNetworkBBTest extends BaseBPMNTest { + @Test + public void updateNetworkBBTest() throws InterruptedException { + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); + assertThat(processInstance).isNotNull(); + assertThat(processInstance).isStarted().hasPassedInOrder( + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "QueryNetworkAAI", "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", + "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); + assertThat(processInstance).isEnded(); + } + + @Test + public void updateNetworkBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiQueryTasks).queryNetworkVpnBinding(any(BuildingBlockExecution.class)); + + ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); + assertThat(processInstance).isStarted().hasPassedInOrder( + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "QueryNetworkAAI", "QueryVpnBindingAAI") + .hasNotPassed("QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", + "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); + assertThat(processInstance).isEnded(); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VnfAdapterTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VnfAdapterTest.java new file mode 100644 index 0000000000..3a41bcac55 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VnfAdapterTest.java @@ -0,0 +1,51 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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.subprocess; + +import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doThrow; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.runtime.ProcessInstance; +import org.junit.Test; +import org.onap.so.bpmn.BaseBPMNTest; +import org.onap.so.bpmn.common.BuildingBlockExecution; + + +public class VnfAdapterTest extends BaseBPMNTest { + @Test + public void vnfAdapterCreatedTest() { + mockSubprocess("vnfAdapterRestV1", "Mocked vnfAdapterRestV1", "GenericStub"); + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("VnfAdapter", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("VnfAdapter_Start", "PreProcessRequest", "Call_vnfAdapterRestV1","PostProcessResponse", "VnfAdapter_End"); + assertThat(pi).isEnded(); + } + + @Test + public void vnfAdapterErrorTest() { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterImpl).preProcessVnfAdapter(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("VnfAdapter", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("VnfAdapter_Start", "PreProcessRequest").hasNotPassed("VnfAdapter_End"); + } +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml new file mode 100644 index 0000000000..0b998c7268 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml @@ -0,0 +1,220 @@ +aai: + auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764 + endpoint: http://localhost:28090 +appc: + client: + key: iaEMAfjsVsZnraBP + response: + timeout: '120000' + secret: wcivUjsjXzmGFBfxMmyJu9dz + poolMembers: localhost:3904,http://localhost:3904 + service: ueb + topic: + read: + name: APPC-TEST-AMDOCS2 + timeout: '120000' + write: APPC-TEST-AMDOCS1-DEV3 + sdnc: + read: SDNC-LCM-READ + write: SDNC-LCM-WRITE +log: + debug: + CompleteMsoProcess: 'true' + CreateNetworkInstanceInfra: 'true' + CreateServiceInstanceInfra: 'true' + DeleteNetworkInstanceInfra: 'true' + FalloutHandler: 'true' + UpdateNetworkInstanceInfra: 'true' + VnfAdapterRestV1: 'true' + sdncAdapter: 'true' + vnfAdapterCreateV1: 'true' + vnfAdapterRestV1: 'true' +mso: + adapters: + completemsoprocess: + endpoint: http://localhost:28090/CompleteMsoProcess + db: + auth: 757A94191D685FD2092AC1490730A4FC + endpoint: http://localhost:28090/dbadapters/RequestsDbAdapter + spring: + endpoint: http://localhost:28090 + network: + endpoint: http://localhost:28090/networks/NetworkAdapter + rest: + endpoint: http://localhost:28090/networks/rest/v1/networks + openecomp: + db: + endpoint: http://localhost:28090/dbadapters/RequestsDbAdapter + po: + auth: 757A94191D685FD2092AC1490730A4FC + password: 3141634BF7E070AA289CF2892C986C0B + sdnc: + endpoint: http://localhost:28090/SDNCAdapter + rest: + endpoint: http://localhost:28090/SDNCAdapter/v1/sdnc + timeout: PT60S + tenant: + endpoint: http://localhost:28090/tenantAdapterMock + vnf: + endpoint: http://localhost:28090/vnfs/VnfAdapter + rest: + endpoint: http://localhost:28090/services/rest/v1/vnfs + volume-groups: + rest: + endpoint: http://localhost:28090/services/rest/v1/volume-groups + vnf-async: + endpoint: http://localhost:28090/vnfs/VnfAdapterAsync + workflow: + message: + endpoint: http://localhost:28090/workflows/messages/message + + async: + core-pool-size: 50 + max-pool-size: 50 + queue-capacity: 500 + + bpmn: + optimisticlockingexception: + retrycount: '3' + callbackRetryAttempts: '5' + catalog: + db: + endpoint: http://localhost:28090/ + spring: + endpoint: http://localhost:28090 + correlation: + timeout: 60 + db: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + default: + adapter: + namespace: http://org.onap.so + healthcheck: + log: + debug: 'false' + infra: + customer: + id: testCustIdInfra + logPath: logs + msoKey: 07a7159d3bf51a0e53be7a8f89699be7 + po: + timeout: PT60S + request: + db: + endpoint: http://localhost:28090/ + rollback: 'true' + service: + agnostic: + sniro: + endpoint: /sniro/api/v2/placement + host: http://localhost:28090 + site-name: localDevEnv + sniro: + auth: test:testpwd + policies: + dhv: + 2vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1 + 4vvig: SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1 + timeout: PT30M + workflow: + default: + aai: + cloud-region: + version: '9' + generic-vnf: + version: '9' + v8: + customer: + uri: /aai/v8/business/customers/customer + generic-query: + uri: /aai/v8/search/generic-query + l3-network: + uri: /aai/v8/network/l3-networks/l3-network + network-policy: + uri: /aai/v8/network/network-policies/network-policy + nodes-query: + uri: /aai/v8/search/nodes-query + route-table-reference: + uri: /aai/v8/network/route-table-references/route-table-reference + tenant: + uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant + vce: + uri: /aai/v8/network/vces/vce + vpn-binding: + uri: /aai/v8/network/vpn-bindings/vpn-binding + v9: + cloud-region: + uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic + generic-vnf: + uri: /aai/v9/network/generic-vnfs/generic-vnf + global: + default: + aai: + namespace: http://org.openecomp.aai.inventory/ + version: '8' + message: + endpoint: http://localhost:28080/mso/WorkflowMesssage + notification: + name: GenericNotificationService + sdncadapter: + callback: http://localhost:28080/mso/SDNCAdapterCallbackService + vnfadapter: + create: + callback: http://localhost:28080/mso/vnfAdapterNotify + delete: + callback: http://localhost:28080/mso/vnfAdapterNotify + query: + callback: http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1 + rollback: + callback: http://localhost:28080/mso/vnfAdapterNotify + global: + dmaap: + username: dmaapUsername + password: dmaapPassword + host: http://localhost:28090 + publisher: + topic: com.att.mso.asyncStatusUpdate +policy: + auth: Basic dGVzdHBkcDphbHBoYTEyMw== + client: + auth: Basic bTAzNzQzOnBvbGljeVIwY2sk + endpoint: https://localhost:8081/pdp/api/ + environment: TEST +sniro: + conductor: + enabled: true + host: http://localhost:8446 + uri: /v1/release-orders + headers.auth: Basic dGVzdDp0ZXN0cHdk + manager: + host: http://localhost:8446 + uri: /sniro/api/placement/v2 + headers.auth: Basic dGVzdDp0ZXN0cHdk + headers.patchVersion: 1 + headers.minorVersion: 1 + headers.latestVersion: 2 +spring: + datasource: + url: jdbc:mariadb://localhost:3307/camundabpmn + username: root + password: password + driver-class-name: org.mariadb.jdbc.Driver + initialize: true + jpa: + generate-ddl: false + show-sql: false + hibernate: + ddl-auto: none + naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy + enable-lazy-load-no-trans: true + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + +mariaDB4j: + dataDir: + port: 3307 + databaseName: camundabpmn +camunda: + bpm: + metrics: + enabled: false + db-reporter-activate: false
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..d8f6ba3930 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml @@ -0,0 +1,30 @@ +<configuration > + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <logger name="AUDIT" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="com.att.eelf.error" level="ERROR" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <root level="WARN"> + <appender-ref ref="STDOUT" /> + </root> + + <logger name="wiremock.org" level="DEBUG" /> + +</configuration>
\ No newline at end of file |