aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCockpit/pom.xml10
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml21
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy64
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy794
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java54
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java219
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java143
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java38
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy59
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java18
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java20
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java36
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java23
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java28
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/FileUtil.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/ResponseExceptionMapperImplTest.java111
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerSupportTest.java83
-rw-r--r--bpmn/MSOCoreBPMN/pom.xml8
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java7
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java1
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java10
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java22
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java54
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java3
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java8
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java10
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java10
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java16
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/pom.xml14
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy148
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy68
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy1586
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java7
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn657
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn424
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateGenericALaCarteServiceInstanceTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateNetworkInstanceTest.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java14
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteGenericALaCarteServiceInstanceTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteNetworkInstanceTest.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateSIRollbackTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateServiceInstanceTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV2Test.java10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesRollbackTest.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteServiceInstanceTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleFromVnfTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleVolumeV2Test.java8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfAndModulesTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVnfAndModulesTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/ReplaceVnfInfraTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceTest.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraV2Test.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVnfInfraTest.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DeleteVcpeResCustServiceTest.java12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json19
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json23
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json23
-rw-r--r--bpmn/MSORESTClient/pom.xml6
-rw-r--r--bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java18
-rw-r--r--bpmn/pom.xml4
124 files changed, 3237 insertions, 2085 deletions
diff --git a/bpmn/MSOCockpit/pom.xml b/bpmn/MSOCockpit/pom.xml
index 7557f5e8ce..e64f68bad0 100644
--- a/bpmn/MSOCockpit/pom.xml
+++ b/bpmn/MSOCockpit/pom.xml
@@ -1,13 +1,13 @@
<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.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCockpit</artifactId>
<packaging>pom</packaging>
<name>MSOCockpit</name>
@@ -47,17 +47,17 @@
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<!--<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>cockpit-urnmap-plugin</artifactId>
<version>${project.version}</version>
</dependency> -->
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index 4a7cb5900a..71626f52b3 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -4,7 +4,7 @@
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
@@ -264,20 +264,20 @@
<version>3.4</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- unit test utilities -->
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
@@ -287,7 +287,7 @@
<version>2.0</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSORESTClient</artifactId>
<version>${project.version}</version>
</dependency>
@@ -501,5 +501,16 @@
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>3.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>pl.pragmatists</groupId>
+ <artifactId>JUnitParams</artifactId>
+ <version>1.1.1</version>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
index 50e761eb77..921e0ee00d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -694,6 +694,49 @@ class CatalogDbUtils {
return vnfsList
}
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+
+ resources = parseServiceResourcesJson(catalogDbResponse, "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+ if (!catalogUtilsVersion.equals("v1")) {
+ resources = new JSONObject(catalogDbResponse)
+ }
+ else {
+ resources = parseServiceResourcesJson(catalogDbResponse, catalogUtilsVersion)
+ }
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+
public JSONObject getServiceResourcesByServiceModelInvariantUuid(Execution execution, String serviceModelInvariantUuid) {
JSONObject resources = null
String endPoint = "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
@@ -1160,4 +1203,25 @@ class CatalogDbUtils {
}
}
+
+ /**
+ * get resource recipe by resource model uuid and action
+ */
+ public JSONObject getResourceRecipe(Execution execution, String resourceModelUuid, String action) {
+ String endPoint = "/resourceRecipe?resourceModelUuid=" + UriUtils.encode(resourceModelUuid, "UTF-8")+ "&action=" + UriUtils.encode(action, "UTF-8")
+ JSONObject responseJson = null
+ try {
+ msoLogger.debug("ENDPOINT: " + endPoint)
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+ responseJson = new JSONObject(catalogDbResponse)
+ }
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return responseJson
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
index 2645ea3c02..8d855e9311 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
@@ -77,6 +77,7 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String serviceModelInfo = execution.getVariable("serviceModelInfo")
execution.setVariable("DDS_serviceModelInvariantId", jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid"))
+ execution.setVariable("DDS_serviceModelUuid", jsonUtils.getJsonValue(serviceModelInfo, "modelUuid"))
execution.setVariable("DDS_modelVersion", jsonUtils.getJsonValue(serviceModelInfo, "modelVersion"))
} catch (BpmnError e) {
throw e;
@@ -97,14 +98,16 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
// check for input
String serviceModelInvariantId = execution.getVariable("DDS_serviceModelInvariantId")
+ String serviceModelUuid = execution.getVariable("DDS_serviceModelUuid")
String modelVersion = execution.getVariable("DDS_modelVersion")
utils.log("DEBUG", "serviceModelInvariantId: " + serviceModelInvariantId, isDebugEnabled)
utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled)
JSONObject catalogDbResponse = null
-
- if (modelVersion != null && modelVersion.length() > 0)
+ if(serviceModelUuid != null && serviceModelUuid.length() > 0)
+ catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelUuid(execution, serviceModelUuid, "v2")
+ else if (modelVersion != null && modelVersion.length() > 0)
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(execution, serviceModelInvariantId, modelVersion, "v2")
else
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuid(execution, serviceModelInvariantId, "v2")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
index d97a304e16..121e0c8ccb 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
@@ -1,398 +1,396 @@
-/*-
- * ============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.openecomp.mso.bpmn.common.scripts
-
-import static org.apache.commons.lang3.StringUtils.*
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-/**
- * @version 1.0
- */
-class ExceptionUtil extends AbstractServiceTaskProcessor {
-
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method formats the exception from AAI into the WorkflowException's
- * errorMessage that CCD expects.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def errorMsg = execution.getVariable(prefix+"ErrorResponse")
- utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
- String text = null
- def variables
- String errorCode = '5000'
- WorkflowException wfex
- utils.log("DEBUG","response: " + response, isDebugEnabled)
- try{
- try {
- //String msg = utils.getNodeXml(response, "Fault")
- variables = utils.getMultNodes(response, "variable")
- text = utils.getNodeText1(response, "text")
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
- }
-
- if(text != null) {
- if(variables.size()>=4){
- text = text.replaceFirst("%1", variables[0])
- text = text.replaceFirst("%2", variables[1])
- text = text.replaceFirst("%3", variables[2])
- text = text.replaceFirst("%4", variables[3])
- }
- String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
- utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
- // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
- buildWorkflowException(execution, 5000, modifiedErrorMessage)
-
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex)
- return wfex
- } else {
- try {
- errorCode = MapErrorCode(errorMsg)
- String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
-
- int errorCodeInt = Integer.parseInt(errorCode)
- buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
-
- utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
- return wfex
- } catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
- return null
-
- }
- }
- }catch(Exception e){
- utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
- buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
- }
- }
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method takes the exact exception inside the <Fault> tags from AAI Response
- * and puts it into the WorkflowException's errorMessage.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
- def utils=new MsoUtils()
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
-
- WorkflowException wfex
- try {
- if(utils.nodeExists(response, "Fault")){
- String fault = utils.getNodeXml(response, "Fault")
- fault = utils.removeXmlPreamble(fault)
- fault = fault.replace("<Fault>", "").replace("</Fault>", "")
- fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
- buildWorkflowException(execution, resCode, fault)
- }else if(utils.nodeExists(response, "RESTFault")){
- String rFault = utils.getNodeXml(response, "RESTFault")
- buildWorkflowException(execution, resCode, rFault)
- }else{
- buildWorkflowException(execution, resCode, "Received a bad response from AAI")
- }
- } catch (Exception ex) {
- utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
- buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
-
- }
- utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
- utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
- }
-
- /**
- * This method takes a WorkflowException Object and builds
- * WorkflowException Xml. This method should only be used
- * for the purpose of sending a sync error response or for
- * creating a FalloutHandler request.
- *
- *@param - WorkflowException Object
- *
- *@return - String WorkflowException Xml
- *
- *
- */
- String buildErrorResponseXml(WorkflowException wfex) {
- String xml
- if(wfex != null){
- String mes = wfex.getErrorMessage()
- int code = wfex.getErrorCode()
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- }else{
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
- <aetgt:ErrorCode>2500</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- }
- return xml
- }
-
- /*
- 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
- 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
- 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
- */
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *
- *@return - String ErrorCode
- *
- */
- private String MapErrorCode(String errorMessage)
- {
- if(errorMessage==null){
- return '5000'
- }
- errorMessage = errorMessage.toLowerCase();
- if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
- return '5020'
- else if (errorMessage.contains('connection'))
- return '5010'
- else
- return '5000'
- }
-
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *@param - String ErrorCode
- *
- *@return - String ErrorMessage
- *
- */
- private String MapErrorMessage(String errorMessage, String errorCode)
- {
- if(errorMessage == null){
- errorMessage=""
- }
- if( errorCode.equals('5010')){
- return 'Could not communicate with A&amp;AI'
- }else if (errorCode.equals('5020')){
- return 'No response from A&amp;AI'
- }else{
- errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- return 'Received error from A&amp;AI (' +errorMessage +')'
- }
- }
-
- /**
- *
- * Utility Method for Mapping SDNC
- * Adapter Response Codes
- *
- *@param - String sdncResponseCode
- *
- *@return - String code
- *
- */
- String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
- {
- if (sdncResponseCode == '500') {
- return '5310'
- } else if ( sdncResponseCode == '408') {
- return '5320'
- } else if ( sdncResponseCode == '60010') {
- return '5350'
- } else {
- return '5300'
- }
- }
-
- /**
- * This error handling method builds a WorkflowException Object. It sets it on
- * the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
- MsoUtils utils = new MsoUtils()
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- }
-
- /**
- * This error handling method builds a WorkflowException Object and throws a
- * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
- * setting the WorkflowException Object on the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * subflow (during subflows "Error Handling Sub Process").
- * It ensures the WorkflowException variable is populated before ending the
- * subflow and also logs the subflows outgoing WorkflowException Variable.
- *
- * @param - execution
- *
- */
- public void processSubflowsBPMNException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null){
- buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
- }
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
- }
- utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * Mainflow. It builds and returns a FalloutHandler Request. It also
- * verifies the WorkflowException variable is populated.
- *
- * @param - execution
- * @param - requestInfo
- *
- * @return - falloutHandlerRequest
- *
- */
- public String processMainflowsBPMNException(Execution execution, String requestInfo){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
- buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
- }
- requestInfo = utils.removeXmlPreamble(requestInfo)
- WorkflowException wfex = execution.getVariable("WorkflowException")
- String errorMessage = wfex.getErrorMessage()
- int errorCode = wfex.getErrorCode()
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- ${requestInfo}
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
-
- return falloutHandlerRequest
-
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
- return null
- }
- utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
- }
-
- /**
- *
- * This method is executed after an Java Exception is caught
- * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
- *
- * @param - execution
- *
- */
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
-
- }catch(BpmnError b){
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
- public void preProcessRequest(Execution execution) {
- // TODO Auto-generated method stub
-
- }
-}
+/*-
+ * ============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.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * @version 1.0
+ */
+class ExceptionUtil extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method formats the exception from AAI into the WorkflowException's
+ * errorMessage that CCD expects.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix=execution.getVariable("prefix")
+ def errorMsg = execution.getVariable(prefix+"ErrorResponse")
+ utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
+ String text = null
+ def variables
+ String errorCode = '5000'
+ WorkflowException wfex
+ utils.log("DEBUG","response: " + response, isDebugEnabled)
+ try{
+ try {
+ //String msg = utils.getNodeXml(response, "Fault")
+ variables = utils.getMultNodes(response, "variable")
+ text = utils.getNodeText1(response, "text")
+ } catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
+ }
+
+ if(text != null) {
+ if(variables.size()>=4){
+ text = text.replaceFirst("%1", variables[0])
+ text = text.replaceFirst("%2", variables[1])
+ text = text.replaceFirst("%3", variables[2])
+ text = text.replaceFirst("%4", variables[3])
+ }
+ String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
+ utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
+ // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
+ buildWorkflowException(execution, 5000, modifiedErrorMessage)
+
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex)
+ return wfex
+ } else {
+ try {
+ errorCode = MapErrorCode(errorMsg)
+ String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
+
+ int errorCodeInt = Integer.parseInt(errorCode)
+ buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
+
+ utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
+ return wfex
+ } catch(Exception ex) {
+ utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
+ return null
+
+ }
+ }
+ }catch(Exception e){
+ utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
+ }
+ }
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method takes the exact exception inside the <Fault> tags from AAI Response
+ * and puts it into the WorkflowException's errorMessage.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
+ def utils=new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+
+ WorkflowException wfex
+ try {
+ if(utils.nodeExists(response, "Fault")){
+ String fault = utils.getNodeXml(response, "Fault")
+ fault = utils.removeXmlPreamble(fault)
+ fault = fault.replace("<Fault>", "").replace("</Fault>", "")
+ fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
+ buildWorkflowException(execution, resCode, fault)
+ }else if(utils.nodeExists(response, "RESTFault")){
+ String rFault = utils.getNodeXml(response, "RESTFault")
+ buildWorkflowException(execution, resCode, rFault)
+ }else{
+ buildWorkflowException(execution, resCode, "Received a bad response from AAI")
+ }
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
+ buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
+
+ }
+ utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
+ utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+ }
+
+ /**
+ * This method takes a WorkflowException Object and builds
+ * WorkflowException Xml. This method should only be used
+ * for the purpose of sending a sync error response or for
+ * creating a FalloutHandler request.
+ *
+ *@param - WorkflowException Object
+ *
+ *@return - String WorkflowException Xml
+ *
+ *
+ */
+ String buildErrorResponseXml(WorkflowException wfex) {
+ String xml
+ if(wfex != null){
+ String mes = wfex.getErrorMessage()
+ int code = wfex.getErrorCode()
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ }else{
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+ }
+ return xml
+ }
+
+ /*
+ 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
+ 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
+ 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
+ */
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *
+ *@return - String ErrorCode
+ *
+ */
+ private String MapErrorCode(String errorMessage)
+ {
+ if(errorMessage==null){
+ return '5000'
+ }
+ errorMessage = errorMessage.toLowerCase();
+ if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
+ return '5020'
+ else if (errorMessage.contains('connection'))
+ return '5010'
+ else
+ return '5000'
+ }
+
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *@param - String ErrorCode
+ *
+ *@return - String ErrorMessage
+ *
+ */
+ private String MapErrorMessage(String errorMessage, String errorCode)
+ {
+ if(errorMessage == null){
+ errorMessage=""
+ }
+ if( errorCode.equals('5010')){
+ return 'Could not communicate with A&amp;AI'
+ }else if (errorCode.equals('5020')){
+ return 'No response from A&amp;AI'
+ }else{
+ errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ return 'Received error from A&amp;AI (' +errorMessage +')'
+ }
+ }
+
+ /**
+ *
+ * Utility Method for Mapping SDNC
+ * Adapter Response Codes
+ *
+ *@param - String sdncResponseCode
+ *
+ *@return - String code
+ *
+ */
+ String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
+ {
+ if (sdncResponseCode == '500') {
+ return '5310'
+ } else if ( sdncResponseCode == '408') {
+ return '5320'
+ } else if ( sdncResponseCode == '60010') {
+ return '5350'
+ } else {
+ return '5300'
+ }
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object. It sets it on
+ * the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ MsoUtils utils = new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object and throws a
+ * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
+ * setting the WorkflowException Object on the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * subflow (during subflows "Error Handling Sub Process").
+ * It ensures the WorkflowException variable is populated before ending the
+ * subflow and also logs the subflows outgoing WorkflowException Variable.
+ *
+ * @param - execution
+ *
+ */
+ public void processSubflowsBPMNException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null){
+ buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
+ }
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
+ }
+ utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * Mainflow. It builds and returns a FalloutHandler Request. It also
+ * verifies the WorkflowException variable is populated.
+ *
+ * @param - execution
+ * @param - requestInfo
+ *
+ * @return - falloutHandlerRequest
+ *
+ */
+ public String processMainflowsBPMNException(Execution execution, String requestInfo){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
+ buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
+ }
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String errorMessage = wfex.getErrorMessage()
+ int errorCode = wfex.getErrorCode()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ ${requestInfo}
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ utils.log("DEBUG", processKey + "Completed ProcessMainflowBPMNException Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
+ return falloutHandlerRequest
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
+ return null
+ }
+ }
+
+ /**
+ *
+ * This method is executed after an Java Exception is caught
+ * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
+ *
+ * @param - execution
+ *
+ */
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
+ public void preProcessRequest(Execution execution) {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
index c3912b48bc..eabd465934 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
@@ -105,11 +105,8 @@ public class MsoRequest {
@Override
public String toString() {
- StringBuilder request = new StringBuilder();
- request.append("<requestId>"+requestId+"</requestId>");
- request.append('\n');
- request.append("<serviceInstanceId>"+serviceInstanceId+"</serviceInstanceId>");
- return request.toString();
+ return "<requestId>" + requestId + "</requestId>" + '\n' + "<serviceInstanceId>" + serviceInstanceId
+ + "</serviceInstanceId>";
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
index 952e3e2f95..c22fd286cf 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
@@ -166,7 +166,7 @@ public class ObjectFactory {
*/
@XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "rollbackVnfNotification")
public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
- return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
+ return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
}
/**
@@ -175,7 +175,7 @@ public class ObjectFactory {
*/
@XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "deleteVnfNotification")
public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
- return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
+ return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
}
/**
@@ -184,7 +184,7 @@ public class ObjectFactory {
*/
@XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "createVnfNotification")
public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
- return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
+ return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
}
/**
@@ -193,7 +193,7 @@ public class ObjectFactory {
*/
@XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "updateVnfNotification")
public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
- return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
+ return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
}
/**
@@ -202,7 +202,7 @@ public class ObjectFactory {
*/
@XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "queryVnfNotification")
public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
- return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
+ return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java
new file mode 100644
index 0000000000..f4ebd0615a
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.openecomp.mso.bpmn.common.recipe;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The bpmn workflow input param object
+ */
+public class BpmnParam {
+
+ @JsonProperty("value")
+ private String value;
+ @JsonProperty("type")
+ private String type = "String";
+
+
+ public BpmnParam() {
+ /* Empty constructor */
+ }
+
+ @JsonProperty("value")
+ public String getValue() {
+ return value;
+ }
+
+ @JsonProperty("type")
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return "CamundaInput [value=" + value + ", type=" + type + "]";
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java
new file mode 100644
index 0000000000..e43af18ceb
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java
@@ -0,0 +1,219 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.openecomp.mso.bpmn.common.recipe;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.utils.CryptoUtils;
+
+/**
+ * Support to call resource recipes from the BPMN workflow.
+ * Such as call resource recipe in service workflow.
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Beijing Release 2018-02-27
+ */
+public class BpmnRestClient {
+
+ public static final String DEFAULT_BPEL_AUTH = "admin:admin";
+
+ public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+ public static final String CONTENT_TYPE_JSON = "application/json";
+
+ public static final String CAMUNDA_AUTH = "camundaAuth";
+
+ private final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+ private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private static boolean noProperties = true;
+
+ public synchronized static MsoJavaProperties loadMsoProperties() {
+ MsoJavaProperties msoProperties;
+ try {
+ msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_APIHANDLER_INFRA);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_LOAD_PROPERTIES_FAIL, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "Exception when loading MSO Properties", e);
+ return null;
+ }
+
+ if(msoProperties != null && msoProperties.size() > 0) {
+ noProperties = false;
+ msoLogger.info(MessageEnum.APIH_PROPERTY_LOAD_SUC, "", "");
+ return msoProperties;
+ } else {
+ msoLogger.error(MessageEnum.APIH_NO_PROPERTIES, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "No MSO APIH_INFRA Properties found");
+ return null;
+ }
+ }
+
+ public synchronized static final boolean getNoPropertiesState() {
+ return noProperties;
+ }
+
+ /**
+ * post the recipe Uri
+ * <br>
+ *
+ * @param recipeUri The request recipe uri
+ * @param requestId the request id
+ * @param recipeTimeout The recipe time out
+ * @param requestAction The request action
+ * @param serviceInstanceId The service instance id
+ * @param serviceType The service Type
+ * @param requestDetails The request Details, these information is from runtime
+ * @param recipeParamXsd The recipe params, its from recipe design
+ * @return The response of the recipe.
+ * @throws ClientProtocolException
+ * @throws IOException
+ * @since ONAP Beijing Release
+ */
+ public static HttpResponse post(String recipeUri, String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParamXsd) throws ClientProtocolException, IOException {
+
+ HttpClient client = HttpClientBuilder.create().build();
+
+ HttpPost post = new HttpPost(recipeUri);
+ MsoJavaProperties props = loadMsoProperties();
+ RequestConfig requestConfig =
+ RequestConfig.custom().setSocketTimeout(recipeTimeout).setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
+ post.setConfig(requestConfig);
+ msoLogger.debug("call the bpmn, url:" + recipeUri);
+ String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, requestDetails, recipeParamXsd);
+
+ StringEntity input = new StringEntity(jsonReq);
+ input.setContentType(CONTENT_TYPE_JSON);
+ String encryptedCredentials;
+ if(props != null) {
+ encryptedCredentials = props.getProperty(CAMUNDA_AUTH, null);
+ if(encryptedCredentials != null) {
+ String userCredentials = getEncryptedPropValue(encryptedCredentials, DEFAULT_BPEL_AUTH, ENCRYPTION_KEY);
+ if(userCredentials != null) {
+ post.addHeader("Authorization", "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes()));
+ }
+ }
+ }
+ post.setEntity(input);
+ return client.execute(post);
+ }
+
+ /**
+ * prepare the resource recipe bpmn request.
+ * <br>
+ *
+ * @param requestId
+ * @param recipeTimeout
+ * @param requestAction
+ * @param serviceInstanceId
+ * @param serviceType
+ * @param requestDetails
+ * @param recipeParams
+ * @return
+ * @since ONAP Beijing Release
+ */
+ private static String wrapResourceRequest(String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParams) {
+ String jsonReq = null;
+ if(requestId == null) {
+ requestId = "";
+ }
+ if(requestAction == null) {
+ requestAction = "";
+ }
+ if(serviceInstanceId == null) {
+ serviceInstanceId = "";
+ }
+
+ if(requestDetails == null) {
+ requestDetails = "";
+ }
+
+ try {
+ ResourceRecipeRequest recipeRequest = new ResourceRecipeRequest();
+ BpmnParam resourceInput = new BpmnParam();
+ BpmnParam host = new BpmnParam();
+ BpmnParam requestIdInput = new BpmnParam();
+ BpmnParam requestActionInput = new BpmnParam();
+ BpmnParam serviceInstanceIdInput = new BpmnParam();
+ BpmnParam serviceTypeInput = new BpmnParam();
+ BpmnParam recipeParamsInput = new BpmnParam();
+ // host.setValue(parseURL());
+ requestIdInput.setValue(requestId);
+ requestActionInput.setValue(requestAction);
+ serviceInstanceIdInput.setValue(serviceInstanceId);
+ recipeParamsInput.setValue(recipeParams);
+ resourceInput.setValue(requestDetails);
+ recipeRequest.setHost(host);
+ recipeRequest.setRequestId(requestIdInput);
+ recipeRequest.setRequestAction(requestActionInput);
+ recipeRequest.setServiceInstanceId(serviceInstanceIdInput);
+ recipeRequest.setServiceType(serviceTypeInput);
+ recipeRequest.setRecipeParams(recipeParamsInput);
+ jsonReq = recipeRequest.toString();
+ msoLogger.debug("request body is " + jsonReq);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request",
+ e);
+ }
+ return jsonReq;
+ }
+
+ /**
+ * <br>
+ *
+ * @param prop
+ * @param defaultValue
+ * @param encryptionKey
+ * @return
+ * @since ONAP Beijing Release
+ */
+ protected static String getEncryptedPropValue(String prop, String defaultValue, String encryptionKey) {
+ try {
+ return CryptoUtils.decrypt(prop, encryptionKey);
+ } catch(GeneralSecurityException e) {
+ msoLogger.debug("Security exception", e);
+ }
+ return defaultValue;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java
new file mode 100644
index 0000000000..5bf5a02a38
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java
@@ -0,0 +1,143 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.openecomp.mso.bpmn.common.recipe;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+/**
+ * java object of the resource recipe , it
+ * will be passed to the Camunda process
+ */
+@JsonPropertyOrder({"resourceInput", "host", "requestId", "requestAction", "serviceInstanceId", "serviceType", "recipeParams"})
+@JsonRootName("variables")
+public class ResourceRecipeRequest {
+
+ @JsonProperty("resourceInput")
+ private BpmnParam resourceInput;
+
+ @JsonProperty("host")
+ private BpmnParam host;
+
+ @JsonProperty("requestId")
+ private BpmnParam requestId;
+
+ @JsonProperty("requestAction")
+ private BpmnParam requestAction;
+
+ @JsonProperty("serviceInstanceId")
+ private BpmnParam serviceInstanceId;
+
+ @JsonProperty("serviceType")
+ private BpmnParam serviceType;
+
+ @JsonProperty("recipeParams")
+ private BpmnParam recipeParams;
+
+ @JsonProperty("resourceInput")
+ public BpmnParam getResourceInput() {
+ return resourceInput;
+ }
+
+ @JsonProperty("resourceInput")
+ public void setResourceInput(BpmnParam resourceInput) {
+ this.resourceInput = resourceInput;
+ }
+
+ @JsonProperty("host")
+ public BpmnParam getHost() {
+ return host;
+ }
+
+ @JsonProperty("host")
+ public void setHost(BpmnParam host) {
+ this.host = host;
+ }
+
+ @JsonProperty("requestId")
+ public BpmnParam getRequestId() {
+ return requestId;
+ }
+
+ @JsonProperty("requestId")
+ public void setRequestId(BpmnParam requestId) {
+ this.requestId = requestId;
+ }
+
+ @JsonProperty("requestAction")
+ public BpmnParam getRequestAction() {
+ return requestAction;
+ }
+
+ @JsonProperty("requestAction")
+ public void setRequestAction(BpmnParam requestAction) {
+ this.requestAction = requestAction;
+ }
+
+ @JsonProperty("serviceInstanceId")
+ public BpmnParam getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ @JsonProperty("serviceInstanceId")
+ public void setServiceInstanceId(BpmnParam serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ }
+
+ @JsonProperty("serviceType")
+ public BpmnParam getServiceType() {
+ return serviceType;
+ }
+
+ @JsonProperty("serviceType")
+ public void setServiceType(BpmnParam serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ @JsonProperty("recipeParams")
+ public BpmnParam getRecipeParams() {
+ return recipeParams;
+ }
+
+ @JsonProperty("recipeParams")
+ public void setRecipeParams(BpmnParam recipeParams) {
+ this.recipeParams = recipeParams;
+ }
+
+ @Override
+ public String toString() {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ String jsonStr = "ResourceRecipeRequest";
+ try {
+ jsonStr = mapper.writeValueAsString(this);
+ } catch(JsonProcessingException e) {
+
+ e.printStackTrace();
+ }
+ return jsonStr;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
index 6cc34f7464..846b87aba8 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
@@ -38,11 +38,10 @@ public class CryptoUtils {
public static final String AES = "AES";
/**
- * encrypt a value and generate a keyfile
+ * encrypt a value and generate a keyfile
* if the keyfile is not found then a new one is created
- * @throws GeneralSecurityException
- * @throws IOException
- */
+ * @throws GeneralSecurityException
+ * */
public static String encrypt(String value, String keyString) throws GeneralSecurityException
{
SecretKeySpec sks = getSecretKeySpec(keyString);
@@ -53,9 +52,8 @@ public class CryptoUtils {
}
/**
- * decrypt a value
+ * decrypt a value
* @throws GeneralSecurityException
- * @throws IOException
*/
public static String decrypt(String message, String keyString) throws GeneralSecurityException
{
@@ -75,14 +73,14 @@ public class CryptoUtils {
private static String byteArrayToHexString(byte[] b){
- StringBuffer sb = new StringBuffer(b.length * 2);
- for (int i = 0; i < b.length; i++){
- int v = b[i] & 0xff;
+ StringBuilder sb = new StringBuilder(b.length * 2);
+ for (byte aB : b) {
+ int v = aB & 0xff;
if (v < 16) {
- sb.append('0');
+ sb.append('0');
}
sb.append(Integer.toHexString(v));
- }
+ }
return sb.toString().toUpperCase();
}
@@ -96,23 +94,5 @@ public class CryptoUtils {
return b;
}
- /**
- * Not Used...
- *
- * Call Rttp utility jar to encrypt pwd
- * @param clearPassword
- * @return
- * @throws GeneralSecurityException
- * @throws Exception
- *
- public static String encryptRttpPwd(String clearPassword) throws GeneralSecurityException {
- try {
- return RttpBasicAuth.encrypt(clearPassword);
- } catch (Exception e) {
- // wrap generic exception
- throw new GeneralSecurityException(e);
- }
- }
- */
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
index d65311dfe8..daca9fcf3f 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
@@ -70,7 +70,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
+ (message == null ? "" : System.lineSeparator()) + message);
try {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (injectedVariables != null) {
variables.putAll(injectedVariables);
@@ -192,7 +192,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
int count = waitingProcesses.size();
- List<ExecInfo> execInfoList = new ArrayList<ExecInfo>(count);
+ List<ExecInfo> execInfoList = new ArrayList<>(count);
for (Execution execution : waitingProcesses) {
execInfoList.add(new ExecInfo(execution));
}
@@ -364,4 +364,4 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
+ ":" + execution.getId() + "]";
}
}
-}
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
index d9aed816c9..4ba35907b9 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -90,7 +90,7 @@ public class WorkflowMessageResource extends AbstractCallbackService {
String correlationValue = correlator;
String contentTypeVariable = messageType + "_CONTENT_TYPE";
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
if (contentType != null) {
variables.put(contentTypeVariable, contentType);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
index 76ff221018..dd100a3824 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
@@ -450,7 +450,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowResponse", workflowResponse);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Success");
@@ -467,7 +467,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
if(workflowExceptionObject instanceof WorkflowException) {
workflowException = (WorkflowException) workflowExceptionObject;
workflowExceptionText = workflowException.toString();
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowException", workflowExceptionText);
responseMap.put("ResponseCode", workflowException.getErrorCode());
responseMap.put("Status", "Fail");
@@ -477,7 +477,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
workflowExceptionText = (String) workflowExceptionObject;
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("WorkflowException", workflowExceptionText);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Fail");
@@ -496,7 +496,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("Response", response);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Success");
@@ -511,7 +511,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
String responseCode = object == null ? null : String.valueOf(object);
msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
- responseMap = new HashMap<String, Object>();
+ responseMap = new HashMap<>();
responseMap.put("Response", errorResponse);
responseMap.put("ResponseCode", responseCode);
responseMap.put("Status", "Fail");
@@ -569,7 +569,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
try {
ProcessEngineServices engine = getProcessEngineServices();
List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
- Map<String,String> variablesMap = new HashMap<String,String>();
+ Map<String,String> variablesMap = new HashMap<>();
for (HistoricVariableInstance variableInstance: variables) {
variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
index 193b8fe903..64e5adc091 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
@@ -28,8 +28,8 @@ import javax.ws.rs.core.Application;
@ApplicationPath("/")
public class WorkflowResourceApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> classes = new HashSet<Class<?>>();
+ private Set<Object> singletons = new HashSet<>();
+ private Set<Class<?>> classes = new HashSet<>();
public WorkflowResourceApplication() {
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java
index aa6e1954a1..f7db52b1c0 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerSupport.java
@@ -56,9 +56,9 @@ public class ApplicationControllerSupport {
private static final int ERROR_SERIES = 200;
private static final int REJECT_SERIES = 300;
private static final int SUCCESS_SERIES = 400;
- private static final int SUCCESS_STATUS = SUCCESS_SERIES + 0;
+ private static final int SUCCESS_STATUS = SUCCESS_SERIES;
private static final int PARTIAL_SERIES = 500;
- private static final int PARTIAL_SUCCESS_STATUS = PARTIAL_SERIES + 0;
+ private static final int PARTIAL_SUCCESS_STATUS = PARTIAL_SERIES;
private static final int PARTIAL_FAILURE_STATUS = PARTIAL_SERIES + 1;
@Value("${lcm.model.package:org.openecomp.appc.client.lcm.model}")
@@ -71,7 +71,7 @@ public class ApplicationControllerSupport {
}
/**
- * @param inputClass
+ * @param action
* @return
* @throws ClassNotFoundException
* @throws InstantiationException
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java
index a21dbe8477..1bdecbf2a7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java
@@ -39,9 +39,8 @@ public class DmaapPropertiesLoader {
}
public DmaapProperties getImpl() {
- Iterator<DmaapProperties> propertyImpls = services.iterator();
- while (propertyImpls.hasNext()) {
- return propertyImpls.next();
+ for (DmaapProperties service : services) {
+ return service;
}
return null;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java
index 124e2c3a28..f54eba406e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java
@@ -42,7 +42,7 @@ public class DMaaPRestClient extends RestClient {
@Override
protected void initializeHeaderMap(Map<String, String> headerMap) {
- headerMap.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(new String(username + ":" + password).getBytes()));
+ headerMap.put("Authorization", "Basic " + Base64.getEncoder().encodeToString((username + ":" + password).getBytes()));
}
@Override
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
index c746c0d448..df30e43822 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
@@ -27,8 +27,8 @@ public interface SDNOValidator {
/**
* Issues a health diagnostic request for a given vnf to SDN-O
*
- * @param vnfName
- * @param uuid
+ * @param vnfId
+ * @param requestingUserId
* @throws IOException
* @throws Exception
*/
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
index cc8ce81dec..26c74b0615 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
@@ -41,7 +41,7 @@ public class Body implements Serializable
@JsonProperty("input")
private Input input;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 9101706044452851559L;
@JsonProperty("input")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
index 7b9bf6f2c7..579f481ba8 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
@@ -43,7 +43,7 @@ public class Input implements Serializable
private RequestHealthDiagnostic RequestHealthDiagnostic;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 7155546785389227528L;
@JsonProperty("request-healthdiagnostic")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
index 104dbb7ee6..2cddd0331e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
@@ -59,7 +59,7 @@ public class RequestHealthDiagnostic implements Serializable
@JsonProperty("health-diagnostic-code")
private String healthDiagnosticCode;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = 1166788526178388021L;
@JsonProperty("request-client-name")
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
index 4d029cb8cb..976f5b9a33 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
@@ -51,7 +51,7 @@ private String requestId;
@JsonProperty("status")
private String status;
@JsonIgnore
-private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+private Map<String, Object> additionalProperties = new HashMap<>();
@JsonProperty("client-name")
public String getClientName() {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
index 4edd54ca09..8505ec9a74 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
@@ -50,7 +50,7 @@ public class SDNO implements Serializable
@JsonProperty("body")
private Body body;
@JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+ private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = -5303297382564282650L;
@JsonProperty("operation")
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy
index ab7ee7a689..5949c3af53 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/CompleteMsoProcessTest.groovy
@@ -16,23 +16,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- */
+ */
package org.openecomp.mso.bpmn.common.scripts
-import org.junit.runner.RunWith;
-import static org.junit.Assert.*
-import static org.mockito.Mockito.*
-
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
import org.mockito.MockitoAnnotations
import org.mockito.runners.MockitoJUnitRunner
import org.openecomp.mso.bpmn.core.WorkflowException
+import static org.assertj.core.api.Assertions.assertThat
+import static org.assertj.core.api.Assertions.assertThatThrownBy
+import static org.mockito.Matchers.eq
+import static org.mockito.Mockito.*
@RunWith(MockitoJUnitRunner.class)
class CompleteMsoProcessTest {
@@ -128,7 +129,7 @@ class CompleteMsoProcessTest {
when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL")
when(mockExecution.getVariable("URN_mso_adapters_db_auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
when(mockExecution.getVariable("URN_mso_msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
-
+
CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
completeMsoProcess.setUpdateDBstatustoSuccessPayload(mockExecution)
@@ -145,29 +146,25 @@ class CompleteMsoProcessTest {
</sdncadapterworkflow:MsoCompletionResponse>"""
*/
@Test
- public void testbuildDataError(){
-
- boolean thrown = false;
- String msg = "Some-Message";
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL-NAME")
- when(mockExecution.getVariable("testProcessKey")).thenReturn("CompleteMsoProcess")
-
- WorkflowException exception = new WorkflowException("CompleteMsoProcess", 500, msg);
-
- try{
- CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
- completeMsoProcess.buildDataError(mockExecution, msg)
- }
- catch (BpmnError e){
- thrown = true;
- }
-
-
- verify(mockExecution).setVariable("CompleteMsoProcessResponse",msoCompletionResponse)
- // Can't seem to figure out how to verify the exception and have spent way too much time on fixing this test case!
- //verify(mockExecution).setVariable("WorkflowException",exception)
- assertTrue(thrown);
- }
+ void testBuildDataError() {
+ // given
+ def message = "Some-Message"
+
+ def mockExecution = mock ExecutionEntity.class
+ when mockExecution.getVariable("CMSO_mso-bpel-name") thenReturn "BPEL-NAME"
+ when mockExecution.getVariable("testProcessKey") thenReturn "CompleteMsoProcess"
+
+ def completeMsoProcess = new CompleteMsoProcess()
+ // when
+ assertThatThrownBy { completeMsoProcess.buildDataError(mockExecution, message) } isInstanceOf BpmnError
+ // then
+ verify mockExecution setVariable("CompleteMsoProcessResponse", msoCompletionResponse)
+ def argumentCaptor = ArgumentCaptor.forClass WorkflowException.class
+ verify mockExecution setVariable(eq("WorkflowException"), argumentCaptor.capture())
+ def capturedException = argumentCaptor.value
+
+ assertThat capturedException.processKey isEqualTo "CompleteMsoProcess"
+ assertThat capturedException.errorCode isEqualTo 500
+ assertThat capturedException.errorMessage isEqualTo message
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
index eef9ed8ee0..0bb5186a17 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
@@ -68,7 +68,7 @@ public class BPMNUtil {
}
@SuppressWarnings("unchecked")
- public static <T extends Object> T getRawVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
+ public static <T> T getRawVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
String pID = getProcessInstanceId(processEngineServices,
processDefinitionID);
assertProcessInstanceFinished(processEngineServices, pID);
@@ -121,7 +121,7 @@ public class BPMNUtil {
private static void buildVariable(String key, String value, Map<String,Object> variableValueType) {
- Map<String, Object> host = new HashMap<String, Object>();
+ Map<String, Object> host = new HashMap<>();
host.put("value", value);
host.put("type", "String");
variableValueType.put(key, host);
@@ -131,7 +131,7 @@ public class BPMNUtil {
WorkflowResource workflowResource = new WorkflowResource();
VariableMapImpl variableMap = new VariableMapImpl();
- Map<String, Object> variableValueType = new HashMap<String, Object>();
+ Map<String, Object> variableValueType = new HashMap<>();
for (String key : variables.keySet()) {
buildVariable(key, variables.get(key), variableValueType);
}
@@ -203,7 +203,7 @@ public class BPMNUtil {
WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
VariableMapImpl variableMap = new VariableMapImpl();
- Map<String, Object> variableValueType = new HashMap<String, Object>();
+ Map<String, Object> variableValueType = new HashMap<>();
for (String key : variables.keySet()) {
buildVariable(key, variables.get(key), variableValueType);
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
index b050a81f18..9d4dac2333 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
@@ -42,7 +42,7 @@ public class CompleteMsoProcessTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
//String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("CompleteMsoProcessRequest",inputRequestFile);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CompleteMsoProcess", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
index 1925c0a1b9..845f06045a 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
@@ -51,7 +51,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
System.out.println("Before starting process");
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
variables.put("ConfirmVolumeGroupName_volumeGroupName", "VOLUME_GROUP_ID_1_NAME");
@@ -83,7 +83,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
System.out.println("Before starting process");
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST");
variables.put("ConfirmVolumeGroupName_volumeGroupName", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
@@ -116,7 +116,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
System.out.println("Before starting process");
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
variables.put("ConfirmVolumeGroupName_volumeGroupName", "BAD_VOLUME_GROUP_NAME");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
index 3856f7b5e1..457128f104 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
@@ -46,7 +46,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest {
public void testRemoveLayer3Service_success() throws Exception{
MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
@@ -66,7 +66,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest {
public void testRemoveLayer3Service_idsNotMatch() throws Exception{
MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
index 045bd6f9c7..b2b7760327 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
@@ -51,7 +51,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC22");
@@ -78,7 +78,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -103,7 +103,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC23");
@@ -128,7 +128,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC21");
@@ -153,7 +153,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4");
@@ -178,7 +178,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfName", "STMTN5MMSC22");
@@ -203,7 +203,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "768073c7-f41f-4822-9323-b75962763d74");
@@ -228,7 +228,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
MockAAICreateGenericVnf();
MockAAIVfModulePUT(true);
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("isVidRequest", "false");
variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
index 5845ec1a56..5cc26459e8 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
@@ -55,7 +55,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
@@ -86,7 +86,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
@@ -117,7 +117,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java
index bda6dd953c..7295cd8e10 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java
@@ -49,7 +49,7 @@ public class DecomposeServiceTest extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
invokeSubProcess("DecomposeService", businessKey, variables);
@@ -66,7 +66,7 @@ public class DecomposeServiceTest extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
invokeSubProcess("DecomposeService", businessKey, variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
index bb2fc03163..564927a854 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
@@ -52,7 +52,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id> <vnf-name>STMTN5MMSC21</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id> <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -88,7 +88,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -123,7 +123,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -158,7 +158,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -193,7 +193,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -228,7 +228,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -263,7 +263,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest",request);
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
@@ -284,7 +284,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
MockAAIDeleteGenericVnf();
MockAAIDeleteVfModule();
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id> <vnf-name>STMTN5MMSC20</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id> <vf-module-name>STMTN5MMSC20-MMSC::module-2-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
index 8281687dec..257cec9b11 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
@@ -58,7 +58,7 @@ public class FalloutHandlerTest extends WorkflowTest {
System.out.println("STARTED TEST: " + method);
//String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("FalloutHandlerRequest",inputRequestFile);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "FalloutHandler", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
index cced8c1860..125a9ad916 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
@@ -51,7 +51,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
public void testGenericDeleteService_success_serviceInstance() throws Exception{
MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -70,7 +70,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -94,7 +94,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceSubscription.xml");
MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -118,7 +118,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, null, "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -142,7 +142,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockGetServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -164,7 +164,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
public void testGenericDeleteService_success_subscriptionGetEmpty200() throws Exception{
MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 200);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -189,7 +189,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GENDSI_getServiceInstanceResponse.xml");
MockDeleteServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -210,7 +210,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
public void testGenericDeleteService_error_invalidVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "1234");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -236,7 +236,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
MockGetServiceInstance_500("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "aaiFault.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
index 473f6c8195..add9a32d61 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
@@ -51,7 +51,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_success_genericVnf() throws Exception{
MockDeleteGenericVnf("testVnfId123", "testReVer123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -66,7 +66,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_success_vce() throws Exception{
MockDeleteVce("testVnfId123", "testReVer123", 204);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "vce", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -83,7 +83,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
MockGetGenericVnfById("/testVnfId123", "GenericFlows/getGenericVnfByNameResponse.xml", 200);
MockDeleteGenericVnf("testVnfId123", "testReVer123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -99,7 +99,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
MockDeleteVce("testVnfId123", "testReVer123", 204);
MockGetVceById("testVnfId123", "GenericFlows/getVceResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "vce", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -114,7 +114,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_success_genericVnf404() throws Exception{
MockDeleteGenericVnf("testVnfId123", "testReVer123", 404);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -129,7 +129,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_success_vce404() throws Exception{
MockDeleteVce("testVnfId123", "testReVer123", 404);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "vce", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -144,7 +144,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_success_genericVnfNoResourceVersion404() throws Exception{
MockGetGenericVnfById_404("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -158,7 +158,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
public void testGenericDeleteVnf_error_missingVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -173,7 +173,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_error_genericVnf500() throws Exception{
MockDeleteGenericVnf_500("testVnfId123", "testReVer123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -188,7 +188,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
public void testGenericDeleteVnf_error_genericVnf412() throws Exception{
MockDeleteGenericVnf("testVnfId123", "testReVer123", 412);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
index 82cceb0b70..0198395750 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
@@ -56,7 +56,7 @@ public class GenericGetServiceTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_success_serviceInstance() throws Exception{
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -81,7 +81,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -109,7 +109,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -139,7 +139,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -168,7 +168,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -192,7 +192,7 @@ public class GenericGetServiceTest extends WorkflowTest {
public void testGenericGetService_success_serviceSubscription404() throws Exception{
MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", 404);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -219,7 +219,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "", "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -246,7 +246,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -273,7 +273,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", " ");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -297,7 +297,7 @@ public class GenericGetServiceTest extends WorkflowTest {
public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "", "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -324,7 +324,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -350,7 +350,7 @@ public class GenericGetServiceTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -375,7 +375,7 @@ public class GenericGetServiceTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericGetService.bpmn"})
public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -403,7 +403,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -430,7 +430,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -459,7 +459,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", null, null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -489,7 +489,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
MockGetServiceInstance("XyCorporation", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
@@ -517,7 +517,7 @@ public class GenericGetServiceTest extends WorkflowTest {
MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
index 126a5fda62..4922263744 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
@@ -52,7 +52,7 @@ public class GenericGetVnfTest extends WorkflowTest {
public void testGenericGetVnf_success_genericVnf() throws Exception{
MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -79,7 +79,7 @@ public class GenericGetVnfTest extends WorkflowTest {
public void testGenericGetVnf_success_vce() throws Exception{
MockGetVceById("testVnfId123[?]depth=1", "GenericFlows/getVceResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "testVnfName123", "vce");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -106,7 +106,7 @@ public class GenericGetVnfTest extends WorkflowTest {
public void testGenericGetVnf_success_genericVnfByName() throws Exception{
MockGetGenericVnfByNameWithDepth("testVnfName123", 1, "GenericFlows/getGenericVnfResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "", "testVnfName123", "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -133,7 +133,7 @@ public class GenericGetVnfTest extends WorkflowTest {
public void testGenericGetVnf_success_vceByName() throws Exception{
MockGetGenericVceByNameWithDepth("testVnfName123", 1, "GenericFlows/getVceByNameResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, null, "testVnfName123", "vce");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -162,7 +162,7 @@ public class GenericGetVnfTest extends WorkflowTest {
MockGetGenericVnfById_500("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
index 149f8aead2..0e0a237090 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
@@ -51,7 +51,7 @@ public class GenericPutVnfTest extends WorkflowTest {
MockPutGenericVnf("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -71,7 +71,7 @@ public class GenericPutVnfTest extends WorkflowTest {
MockPutVce("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", vcePayload, "vce");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -91,7 +91,7 @@ public class GenericPutVnfTest extends WorkflowTest {
MockPutGenericVnf("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", genericVnfPayload, "");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -113,7 +113,7 @@ public class GenericPutVnfTest extends WorkflowTest {
MockPutGenericVnf("testVnfId123");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", genericVnfPayload, "");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -133,7 +133,7 @@ public class GenericPutVnfTest extends WorkflowTest {
@Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
public void testGenericPutVnf_error_404() throws Exception{
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -154,7 +154,7 @@ public class GenericPutVnfTest extends WorkflowTest {
MockPutGenericVnf("/testVnfId123", 400);
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
index e49ef0032e..3210fe8fc7 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
@@ -23,7 +23,7 @@
*/
package org.openecomp.mso.bpmn.common;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid;
import static org.openecomp.mso.bpmn.mock.StubResponseSNIRO.*;
import static org.junit.Assert.*;
@@ -140,7 +140,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -183,7 +183,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables2(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -235,9 +235,10 @@ public class HomingTest extends WorkflowTest {
// Create a Service Decomposition
//System.out.println("At start of testHoming_success_vnfResourceList");
- MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json");
+ MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json");
+ //MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json");
String busKey = UUID.randomUUID().toString();
- Map<String, Object> vars = new HashMap<String, Object>();
+ Map<String, Object> vars = new HashMap<>();
setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
invokeSubProcess("DecomposeService", busKey, vars);
@@ -252,7 +253,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled", "true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "testServiceInstanceId");
@@ -288,7 +289,7 @@ public class HomingTest extends WorkflowTest {
public void testHoming_error_inputVariable() throws Exception {
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables3(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -307,7 +308,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO_500();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -326,7 +327,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -347,7 +348,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("Homing", businessKey, variables);
@@ -368,7 +369,7 @@ public class HomingTest extends WorkflowTest {
mockSNIRO();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("Homing", businessKey, variables);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java
index 6141ee021f..a7c2d19aa0 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java
@@ -67,7 +67,7 @@ public class ManualHandlingTest extends WorkflowTest {
public void TestManualHandlingSuccess() {
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceType", "X");
@@ -103,7 +103,7 @@ public class ManualHandlingTest extends WorkflowTest {
System.out.println("TASK NAME: " + task.getName());
try {
System.out.println("Completing the task");
- Map<String,Object> completeVariables = new HashMap<String,Object>();
+ Map<String,Object> completeVariables = new HashMap<>();
completeVariables.put("responseValue", "skip");
taskService.complete(task.getId(), completeVariables);
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
index 441cefdb41..be74770e98 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
@@ -60,7 +60,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("skask", "supercool");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -94,7 +94,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
MockGetGenericVnfById_404("skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -129,7 +129,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -159,7 +159,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
@@ -190,7 +190,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java
index 8a78f3206c..65575ba861 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java
@@ -57,7 +57,7 @@ public class RainyDayHandlerTest extends WorkflowTest {
public void TestRainyDayHandlingSuccess() {
RuntimeService runtimeService = processEngineRule.getRuntimeService();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceType", "X");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java
index 4669192249..a806515974 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java
@@ -85,7 +85,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest {
logStart();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
variables.put("isDebugLogEnabled", "true");
variables.put("RCVWFMSG_timeout", "PT1M");
@@ -115,7 +115,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest {
logStart();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
variables.put("isDebugLogEnabled", "true");
variables.put("RCVWFMSG_timeout", "PT0.1S");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
index 778eec190e..0349b178cb 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
@@ -75,12 +75,12 @@ public class SDNCAdapterV1Test extends WorkflowTest {
private WorkflowResponse invokeFlow(String workflowRequest) {
- Map<String, Object>valueMap = new HashMap<String, Object>();
+ Map<String, Object>valueMap = new HashMap<>();
valueMap.put("value", workflowRequest);
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("sdncAdapterWorkflowRequest", valueMap);
- Map<String, Object> valueMap2 = new HashMap<String, Object>();
+ Map<String, Object> valueMap2 = new HashMap<>();
valueMap2.put("value", "true");
variables.put("isDebugLogEnabled", valueMap2);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
index 20f6f6d264..7c557ffe63 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
@@ -59,7 +59,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
MockPatchGenericVnf("skask");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -92,7 +92,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -122,7 +122,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
MockGetGenericVnfById_404("skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
@@ -156,7 +156,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
index 0e523cbfa3..30d7e6d8c6 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
@@ -58,7 +58,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("skask", "supercool");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
@@ -89,7 +89,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
@@ -122,7 +122,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "999-99-9999");
variables.put("isDebugLogEnabled","true");
variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
index 707fe46cc1..fb029fa740 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
@@ -241,7 +241,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", requestId);
variables.put("isDebugLogEnabled", "true");
variables.put("vnfAdapterRestV1Request", request);
@@ -272,7 +272,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
String request = UPDATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", requestId);
variables.put("isDebugLogEnabled", "true");
variables.put("vnfAdapterRestV1Request", request);
@@ -303,7 +303,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
String request = DELETE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", requestId);
variables.put("isDebugLogEnabled", "true");
variables.put("vnfAdapterRestV1Request", request);
@@ -334,7 +334,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
String request = ROLLBACK_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", requestId);
variables.put("isDebugLogEnabled", "true");
variables.put("vnfAdapterRestV1Request", request);
@@ -365,7 +365,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", requestId);
variables.put("isDebugLogEnabled", "true");
variables.put("vnfAdapterRestV1Request", request);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
index 426bceef4b..5f91298958 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
@@ -42,7 +42,7 @@ public class WorkflowAsyncResourceTest extends WorkflowTest {
//it can be any request which asynchronously processed by the workflow
String request = "<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns5=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-information xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\"> <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type> <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id> <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>";
- Map<String,String> variables = new HashMap<String,String>();
+ Map<String,String> variables = new HashMap<>();
variables.put("testAsyncRequestMsg", request);
variables.put("mso-request-id", UUID.randomUUID().toString());
variables.put("mso-service-request-timeout", "5");
@@ -56,17 +56,17 @@ public class WorkflowAsyncResourceTest extends WorkflowTest {
WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
VariableMapImpl variableMap = new VariableMapImpl();
- Map<String, Object> variableValueType = new HashMap<String, Object>();
+ Map<String, Object> variableValueType = new HashMap<>();
- Map<String, Object> requestMsg = new HashMap<String, Object>();
+ Map<String, Object> requestMsg = new HashMap<>();
requestMsg.put("value", request);
requestMsg.put("type", "String");
- Map<String, Object> msorequestId = new HashMap<String, Object>();
+ Map<String, Object> msorequestId = new HashMap<>();
msorequestId.put("type", "String");
msorequestId.put("value",requestId);
- Map<String, Object> timeout = new HashMap<String, Object>();
+ Map<String, Object> timeout = new HashMap<>();
timeout.put("type", "String");
timeout.put("value","5");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
index ce8eb7afec..6f0095fb02 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
@@ -327,7 +327,7 @@ public class WorkflowTest {
String businessKey, String request, Map<String, Object> injectedVariables,
boolean serviceInstantiationModel) {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
// These variables may be overridded by injected variables.
variables.put("mso-service-request-timeout", "180");
@@ -422,7 +422,7 @@ public class WorkflowTest {
* @return a VariableMap
*/
private VariableMapImpl createVariableMapImpl(Map<String, Object> variables) {
- Map<String, Object> wrappedVariables = new HashMap<String, Object>();
+ Map<String, Object> wrappedVariables = new HashMap<>();
for (String key : variables.keySet()) {
Object value = variables.get(key);
@@ -441,7 +441,7 @@ public class WorkflowTest {
* @return the wrapped variable
*/
private Map<String, Object> wrapVariableValue(Object value) {
- HashMap<String, Object> valueMap = new HashMap<String, Object>();
+ HashMap<String, Object> valueMap = new HashMap<>();
valueMap.put("value", value);
return valueMap;
}
@@ -1634,11 +1634,7 @@ public class WorkflowTest {
return null;
}
- Collections.sort(processInstanceList, new Comparator<HistoricProcessInstance>() {
- public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
- return m1.getStartTime().compareTo(m2.getStartTime());
- }
- });
+ processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
HistoricProcessInstance processInstance = processInstanceList.get(0);
@@ -1672,11 +1668,7 @@ public class WorkflowTest {
return null;
}
- Collections.sort(processInstanceList, new Comparator<HistoricProcessInstance>() {
- public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {
- return m1.getStartTime().compareTo(m2.getStartTime());
- }
- });
+ processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);
@@ -1784,7 +1776,7 @@ public class WorkflowTest {
* An object that contains callback data for a "program".
*/
public class CallbackSet {
- private final Map<String, CallbackData> map = new HashMap<String, CallbackData>();
+ private final Map<String, CallbackData> map = new HashMap<>();
/**
* Add untyped callback data to the set.
@@ -1837,7 +1829,7 @@ public class WorkflowTest {
/**
* Constructor
* @param contentType the HTTP content type (optional)
- * @param type the callback message type (optional)
+ * @param messageType the callback message type (optional)
* @param content the content
*/
public CallbackData(String contentType, String messageType, String content) {
@@ -1983,8 +1975,8 @@ public class WorkflowTest {
* A NamespaceContext class based on a Map.
*/
private class SimpleNamespaceContext implements NamespaceContext {
- private Map<String, String> prefixMap = new HashMap<String, String>();
- private Map<String, String> uriMap = new HashMap<String, String>();
+ private Map<String, String> prefixMap = new HashMap<>();
+ private Map<String, String> uriMap = new HashMap<>();
public synchronized void add(String prefix, String uri) {
prefixMap.put(prefix, uri);
@@ -1998,7 +1990,7 @@ public class WorkflowTest {
@Override
public Iterator<String> getPrefixes(String uri) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
String prefix = uriMap.get(uri);
if (prefix != null) {
list.add(prefix);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/FileUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/FileUtil.java
index 2ebb44a644..38d0584d0d 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/FileUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/FileUtil.java
@@ -35,11 +35,6 @@ public class FileUtil {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private FileUtil() {
- /**
- * Constructor.
- */
- }
/**
* Read the specified resource file and return the contents as a String.
*
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java
index fc97e69c5c..74f50ba438 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java
@@ -45,7 +45,7 @@ public class MockResource {
private boolean started = false;
private final Integer defaultPort = 28090;
private WireMockServer wireMockServer = null;
- private static Map<String,String> mockProperties = new HashMap<String,String>();
+ private static Map<String,String> mockProperties = new HashMap<>();
public static String getMockProperties(String key) {
return mockProperties.get(key);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
index ebbfea5cd1..ba48bffca0 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
@@ -31,8 +31,8 @@ import javax.ws.rs.core.Application;
@ApplicationPath("/console")
public class MockResourceApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> classes = new HashSet<Class<?>>();
+ private Set<Object> singletons = new HashSet<>();
+ private Set<Class<?>> classes = new HashSet<>();
public MockResourceApplication() {
singletons.add(new MockResource());
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
index c9f64d9b26..ffa6701a89 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
@@ -98,5 +98,13 @@ public class StubResponseDatabase {
.withBodyFile(responseFile)));
}
+ public static void MockGetServiceResourcesCatalogDataByModelUuid(String serviceModelUuid, String responseFile){
+ stubFor(get(urlEqualTo("/v2/serviceResources?serviceModelUuid=" + serviceModelUuid))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBodyFile(responseFile)));
+ }
+
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/ResponseExceptionMapperImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/ResponseExceptionMapperImplTest.java
new file mode 100644
index 0000000000..8943014ad0
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/ResponseExceptionMapperImplTest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============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.openecomp.mso.client;
+
+import static org.assertj.core.api.Assertions.assertThatCode;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import com.google.common.base.Charsets;
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.ForbiddenException;
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.NotAcceptableException;
+import javax.ws.rs.NotAllowedException;
+import javax.ws.rs.NotAuthorizedException;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.NotSupportedException;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientResponseContext;
+import javax.ws.rs.core.Response.Status;
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(JUnitParamsRunner.class)
+public class ResponseExceptionMapperImplTest {
+
+ private static final ResponseExceptionMapperImpl mapper = new ResponseExceptionMapperImpl();
+
+ public static Object[][] statusesAndCorrespondingExceptions() {
+ return new Object[][]{
+ {Status.BAD_REQUEST, BadRequestException.class},
+ {Status.UNAUTHORIZED, NotAuthorizedException.class},
+ {Status.FORBIDDEN, ForbiddenException.class},
+ {Status.NOT_FOUND, NotFoundException.class},
+ {Status.METHOD_NOT_ALLOWED, NotAllowedException.class},
+ {Status.NOT_ACCEPTABLE, NotAcceptableException.class},
+ {Status.PRECONDITION_FAILED, PreconditionFailedException.class},
+ {Status.UNSUPPORTED_MEDIA_TYPE, NotSupportedException.class},
+ {Status.INTERNAL_SERVER_ERROR, InternalServerErrorException.class},
+ {Status.SERVICE_UNAVAILABLE, WebApplicationException.class},
+ {Status.BAD_GATEWAY, WebApplicationException.class},
+ };
+ }
+
+ @Test
+ @Parameters(method = "statusesAndCorrespondingExceptions")
+ public void shouldThrowExceptionWhenStatusIsNotOk(Status status, Class<Exception> expectedException) {
+ // given
+ ClientResponseContext responseContext = createMockResponseContext(status);
+ // when, then
+ assertThatThrownBy(() -> mapper.filter(null, responseContext)).isInstanceOf(expectedException);
+ }
+
+ @Test
+ public void shouldNotThrowExceptionWhenStatusIsOk() {
+ // given
+ ClientResponseContext responseContext = createMockResponseContext(Status.OK);
+ // when, then
+ assertThatCode(() -> mapper.filter(null, responseContext)).doesNotThrowAnyException();
+ }
+
+ @Test
+ public void shouldThrowExceptionWithCustomMessageWhenResponseHasEntity() {
+ // given
+ ClientResponseContext responseContext = createMockResponseContext(Status.BAD_REQUEST);
+ when(responseContext.hasEntity()).thenReturn(true);
+ when(responseContext.getEntityStream()).thenReturn(IOUtils.toInputStream("test message", Charsets.UTF_8));
+ // when, then
+ assertThatThrownBy(() -> mapper.filter(null, responseContext)).isInstanceOf(BadRequestException.class)
+ .hasMessage("test message");
+ }
+
+ @Test
+ public void shouldThrowExceptionWithDefaultMessageWhenResponseHasNoEntity() {
+ // given
+ ClientResponseContext responseContext = createMockResponseContext(Status.BAD_REQUEST);
+ when(responseContext.hasEntity()).thenReturn(false);
+ // when, then
+ assertThatThrownBy(() -> mapper.filter(null, responseContext)).isInstanceOf(BadRequestException.class)
+ .hasMessage("empty message");
+ }
+
+ private static ClientResponseContext createMockResponseContext(Status status) {
+ ClientResponseContext responseContext = mock(ClientResponseContext.class);
+ when(responseContext.getStatusInfo()).thenReturn(status);
+ when(responseContext.getStatus()).thenReturn(status.getStatusCode());
+ return responseContext;
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerSupportTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerSupportTest.java
new file mode 100644
index 0000000000..0a323e43d8
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerSupportTest.java
@@ -0,0 +1,83 @@
+/*-
+ * ============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.openecomp.mso.client.appc;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openecomp.appc.client.lcm.model.Status;
+import org.openecomp.mso.client.appc.ApplicationControllerSupport.StatusCategory;
+
+@RunWith(JUnitParamsRunner.class)
+public class ApplicationControllerSupportTest {
+
+ public static Object[][] statusesAndCategories() {
+ return new Object[][]{
+ {100, StatusCategory.NORMAL},
+ {200, StatusCategory.ERROR},
+ {300, StatusCategory.ERROR},
+ {400, StatusCategory.NORMAL},
+ {401, StatusCategory.ERROR},
+ {500, StatusCategory.NORMAL},
+ {501, StatusCategory.ERROR},
+ {502, StatusCategory.WARNING},
+ {800, StatusCategory.WARNING},
+ };
+ }
+
+ public static Object[][] statusesAndFinalities() {
+ return new Object[][]{
+ {100, false},
+ {200, true},
+ {300, true},
+ {400, true},
+ {500, false},
+ {800, true},
+ };
+ }
+
+ @Test
+ @Parameters(method = "statusesAndCategories")
+ public void shouldReturnCategoryForCode(int code, StatusCategory category) throws Exception {
+ // when
+ StatusCategory detectedCategory = ApplicationControllerSupport.getCategoryOf(createStatus(code));
+ // then
+ assertThat(detectedCategory).isEqualTo(category);
+ }
+
+ @Test
+ @Parameters(method = "statusesAndFinalities")
+ public void shouldReturnFinalityForCode(int code, boolean expectedFinality) throws Exception {
+ // when
+ boolean finality = ApplicationControllerSupport.getFinalityOf(createStatus(code));
+ // then
+ assertThat(finality).isEqualTo(expectedFinality);
+ }
+
+ private Status createStatus(int code) {
+ Status status = new Status();
+ status.setCode(code);
+ return status;
+ }
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
index 267f175533..960a553757 100644
--- a/bpmn/MSOCoreBPMN/pom.xml
+++ b/bpmn/MSOCoreBPMN/pom.xml
@@ -2,12 +2,12 @@
<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.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<packaging>jar</packaging>
@@ -128,7 +128,7 @@
<artifactId>Saxon-HE</artifactId>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
@@ -164,7 +164,7 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>status-control</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
index 204d9e4e5e..9c79df85ff 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
@@ -238,9 +238,10 @@ public class HealthCheckHandler {
BPMNLogger.debug(healthcheckDebugEnabled, "Post url is: " + url);
//now create a soap request message as follows:
- final StringBuffer payload = new StringBuffer();
+ final StringBuilder payload = new StringBuilder();
payload.append("\n");
- payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"" + adapterNamespace + "/requestsdb\">\n");
+ payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"")
+ .append(adapterNamespace).append("/requestsdb\">\n");
payload.append("<soapenv:Header/>\n");
payload.append("<soapenv:Body>\n");
payload.append("<req:getSiteStatus>\n");
@@ -270,7 +271,7 @@ public class HealthCheckHandler {
BufferedReader rd = new BufferedReader(
new InputStreamReader(response.getEntity().getContent()));
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
String line = "";
while ((line = rd.readLine()) != null) {
result.append(line);
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
index 6059a357b6..b6272057a5 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
@@ -238,7 +238,6 @@ public class PropertyConfiguration {
* Reads properties from the specified file, updates the property file cache, and
* returns the properties in a map.
* @param file the file to read
- * @param reload true if this is a reload event
* @return a map of properties
*/
private Map<String, String> readProperties(File file) throws IOException {
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
index ce171b56e4..a1719a90ef 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
@@ -156,7 +156,7 @@ public class PropertyConfigurationSetup {
* Create a map to hold properties to be added to mso.bpmn.properties.
*/
public static Map<String, String> createBpmnProperties() {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_PROPERTIES);
return properties;
}
@@ -165,7 +165,7 @@ public class PropertyConfigurationSetup {
* Create a map to hold properties to be added to mso.bpmn.urn.properties.
*/
public static Map<String, String> createBpmnUrnProperties() {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_URN_PROPERTIES);
return properties;
}
@@ -176,7 +176,7 @@ public class PropertyConfigurationSetup {
* PropertyConfiguration, just like they do when a property file is updated on
* a real MSO system. This method will optionally wait for the new properties
* to be loaded. Timeout results in an IOException.
- * @param values new properties
+ * @param properties new properties
* @param wait maximum amount of time to wait for new properties to be loaded,
* in milliseconds. A value of zero means, "Do not wait."
* @throws IOException
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
index 64068d2b90..f49712ee8b 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
@@ -35,7 +35,7 @@ public class RollbackData implements Serializable {
private static final long serialVersionUID = 1L;
private Map<String, Map<String, Serializable>> dictionary =
- new HashMap<String, Map<String, Serializable>>();
+ new HashMap<>();
/**
* Returns true if the specified type is stored in this object.
@@ -54,12 +54,8 @@ public class RollbackData implements Serializable {
* @param value the value
*/
public void put(String type, String key, String value) {
- Map<String, Serializable> mapForType = dictionary.get(type);
-
- if (mapForType == null) {
- mapForType = new HashMap<String, Serializable>();
- dictionary.put(type, mapForType);
- }
+ Map<String, Serializable> mapForType = dictionary
+ .computeIfAbsent(type, k -> new HashMap<>());
mapForType.put(key, value);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
index 21653e26c3..b555563936 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
@@ -31,7 +31,7 @@ public class WorkflowException implements Serializable {
private final String processKey;
private final int errorCode;
private final String errorMessage;
-
+
/**
* Constructor
* @param processKey the process key for the process that generated the exception
@@ -44,42 +44,34 @@ public class WorkflowException implements Serializable {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
-
+
/**
* Returns the process key.
*/
public String getProcessKey() {
return processKey;
}
-
+
/**
* Returns the error code.
*/
public int getErrorCode() {
return errorCode;
}
-
+
/**
* Returns the error message.
*/
public String getErrorMessage() {
return errorMessage;
}
-
+
/**
* Returns a string representation of this object.
*/
@Override
public String toString() {
- StringBuilder out = new StringBuilder();
- out.append(getClass().getSimpleName());
- out.append("[processKey=");
- out.append(getProcessKey());
- out.append(",errorCode=");
- out.append(getErrorCode());
- out.append(",errorMessage=");
- out.append(getErrorMessage());
- out.append("]");
- return out.toString();
+ return getClass().getSimpleName() + "[processKey=" + getProcessKey() + ",errorCode=" + getErrorCode()
+ + ",errorMessage=" + getErrorMessage() + "]";
}
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
index 4d895f3279..fbed36548e 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
@@ -92,10 +92,6 @@ public abstract class JsonWrapper implements Serializable {
JSONObject json = new JSONObject();
try {
json = new JSONObject(mapper.writeValueAsString(this));
- } catch (JsonGenerationException e) {
- LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (JSONException e) {
LOGGER.debug("Exception :",e);
} catch (IOException e) {
@@ -113,8 +109,6 @@ public abstract class JsonWrapper implements Serializable {
jsonString = mapper.writeValueAsString(list);
} catch (JsonGenerationException e) {
LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (IOException e) {
LOGGER.debug("Exception :",e);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
index 0e985cc8f1..8581eee25a 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
@@ -146,15 +146,12 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
/**
* This method returns String representation of one combined list of Resources of All Types
- * @return
*/
@JsonIgnore
- public String getServiceResourcesJsonString(){
- StringBuffer serviceResourcesJsonStringBuffer = new StringBuffer();
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceNetworks())));
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceVnfs())));
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceAllottedResources())));
- return serviceResourcesJsonStringBuffer.toString();
+ public String getServiceResourcesJsonString() {
+ return listToJson((this.getServiceNetworks())) +
+ listToJson((this.getServiceVnfs())) +
+ listToJson((this.getServiceAllottedResources()));
}
/**
@@ -186,15 +183,13 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
@JsonIgnore
public String getVnfResource(String resourceObjectId) {
- Iterator<Resource> iter = getServiceResources().iterator();
- while (iter.hasNext()) {
- Resource resource = iter.next();
- //resource.getModelInfo().getModelInvariantId();
+ for (Resource resource : getServiceResources()) {
+ //resource.getModelInfo().getModelInvariantId();
- if ("extracted information".equals(resourceObjectId)){
- return resource.toJsonString();
- }
- }
+ if ("extracted information".equals(resourceObjectId)) {
+ return resource.toJsonString();
+ }
+ }
return "";
}
@@ -205,7 +200,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addVnfResource(Resource vnfResource) {
if (vnfResources == null){
- vnfResources = new ArrayList<VnfResource>();
+ vnfResources = new ArrayList<>();
}
this.vnfResources.add((VnfResource)vnfResource);
}
@@ -215,7 +210,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addNetworkResource(Resource networkResource) {
if (networkResources == null){
- networkResources = new ArrayList<NetworkResource>();
+ networkResources = new ArrayList<>();
}
this.networkResources.add((NetworkResource)networkResource);
}
@@ -225,7 +220,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addAllottedResource(Resource allottedResource) {
if (allottedResources == null){
- allottedResources = new ArrayList<AllottedResource>();
+ allottedResources = new ArrayList<>();
}
this.allottedResources.add((AllottedResource)allottedResource);
}
@@ -290,13 +285,11 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
public boolean replaceResource(Resource newResource){
boolean result = false;
List serviceResources = getServiceResources();
- Iterator<Resource> iter = serviceResources.iterator();
- while (iter.hasNext()) {
- Resource resource = iter.next();
+ for (Resource resource : (Iterable<Resource>) serviceResources) {
System.out.println("resource found");
- if (resource.resourceType == newResource.resourceType){
+ if (resource.resourceType == newResource.resourceType) {
System.out.println("resource type matches");
- if (resource.getResourceId().equalsIgnoreCase(newResource.getResourceId())){
+ if (resource.getResourceId().equalsIgnoreCase(newResource.getResourceId())) {
System.out.println("resource id matches");
//returns TRUE if replacement is a success
result = Collections.replaceAll(serviceResources, resource, newResource);
@@ -326,12 +319,9 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public boolean deleteResource(Resource resource){
List serviceResources = getServiceResources();
- Iterator<Resource> iter = serviceResources.iterator();
- while (iter.hasNext()) {
- Resource item = iter.next();
-
- if (item.resourceType == resource.resourceType){
- if (item.getResourceId().equalsIgnoreCase(resource.getResourceId())){
+ for (Resource item : (Iterable<Resource>) serviceResources) {
+ if (item.resourceType == resource.resourceType) {
+ if (item.getResourceId().equalsIgnoreCase(resource.getResourceId())) {
//returns TRUE if replacement is a success
return serviceResources.remove(resource);
}
@@ -377,10 +367,8 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
@JsonIgnore
public Resource getServiceResource(String resourceId){
List<Resource> resources = getServiceResources();
- Iterator<Resource> iter = resources.iterator();
- while (iter.hasNext()){
- Resource resource = iter.next();
- if (resource.getResourceId().equalsIgnoreCase(resourceId)){
+ for (Resource resource : resources) {
+ if (resource.getResourceId().equalsIgnoreCase(resourceId)) {
//match
return resource;
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
index 0d8721b4d1..20903c0717 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
@@ -134,7 +134,7 @@ public class VnfResource extends Resource {
// methods to add to the list
public void addVfModule(ModuleResource moduleResource) {
if (vfModules == null){
- vfModules = new ArrayList<ModuleResource>();
+ vfModules = new ArrayList<>();
}
this.vfModules.add(moduleResource);
}
@@ -146,7 +146,6 @@ public class VnfResource extends Resource {
*
* default setter for this field deprecated
* @param modelName << serviceResources.modelInfo.modelName
- * @param modelInstanceName
*/
public void constructVnfType(String modelName) {
this.vnfType = modelName.concat("/").concat(this.modelInfo.getModelInstanceName());
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
index 640dc697a2..b0152a1296 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
@@ -117,12 +117,12 @@ public class JsonUtils {
* to convert a JSONObject to an XML Doc. The intent of this is to
* correctly generate XML from JSON including TAGs for JSONArrays
*
- * @param jsonObj org.json.JSON object to be converted to XML
+ * @param obj object to be converted to XML
* @param tagName optional XML tagname supplied primarily during recursive calls
* @return String containing the XML translation
*/
public static String toXMLString(Object obj, String tagName) throws JSONException {
- StringBuffer strBuf = new StringBuffer();
+ StringBuilder strBuf = new StringBuilder();
int i;
JSONArray jsonArr;
JSONObject jsonObj;
@@ -388,7 +388,7 @@ public class JsonUtils {
return 0;
} else {
if (rawValue instanceof Integer) {
- msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue).toString());
+ msoLogger.debug("getJsonValue(): the raw value is an Integer Object=" + ((String) rawValue));
return (Integer) rawValue;
} else {
msoLogger.debug("getJsonValue(): the raw value is NOT an Integer Object=" + rawValue.toString());
@@ -913,7 +913,7 @@ public class JsonUtils {
* and puts it in a Java List<String>.
*
* @param execution
- * @param stringArray - the getJsonValue of a json array of strings
+ * @param jsonArrayOfStrings - the getJsonValue of a json array of strings
*
* @return List - a java list containing the strings
*
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
index 967b1dfe1c..cfa5c853a3 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
@@ -85,10 +85,6 @@ public abstract class JsonWrapper implements Serializable {
JSONObject json = new JSONObject();
try {
json = new JSONObject(mapper.writeValueAsString(this));
- } catch (JsonGenerationException e) {
- LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (JSONException e) {
LOGGER.debug("Exception :",e);
} catch (IOException e) {
@@ -106,8 +102,6 @@ public abstract class JsonWrapper implements Serializable {
jsonString = mapper.writeValueAsString(list);
} catch (JsonGenerationException e) {
LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (IOException e) {
LOGGER.debug("Exception :",e);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
index ad4a1a52c8..4dde5ae595 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
@@ -88,7 +88,7 @@ public class CustomMyBatisSessionFactory extends
@Override
protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
List<CommandInterceptor> defaultCommandInterceptorsTxRequired =
- new ArrayList<CommandInterceptor>();
+ new ArrayList<>();
defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(
commandContextFactory, this, true));
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
index 177fafcd4b..c48b671b72 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/URNMapping.java
@@ -93,7 +93,7 @@ public class URNMapping {
* aai:endpoint becomes URN_aai_endpoint <br/>
* ae:internal-reporting becomes URN_ae_internal_reporting <br/>
*
- * @param name the URN
+ * @param urn the URN
* @return a normalized identifier
*/
public static String createIdentifierFromURN(String urn) {
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index c346308e2b..730c1451d5 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -321,14 +321,8 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
}
private void loadFromDB(DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) {
- Command<List<URNMapping>> command = new Command<List<URNMapping>>() {
- @SuppressWarnings("unchecked")
- @Override
- public List<URNMapping> execute(CommandContext commandContext) {
- return (List<URNMapping>) commandContext.getDbSqlSession().selectList(
- "mso.urnMapping.selectAll", null);
- }
- };
+ Command<List<URNMapping>> command = commandContext -> (List<URNMapping>) commandContext.getDbSqlSession()
+ .selectList("mso.urnMapping.selectAll", null);
CustomMyBatisSessionFactory sessionFactory = new CustomMyBatisSessionFactory();
sessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration,
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
index 18113fabcd..d25dcb6f3c 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -65,7 +65,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
processEngineConfiguration.getCustomPreBPMNParseListeners();
if (preParseListeners == null) {
- preParseListeners = new ArrayList<BpmnParseListener>();
+ preParseListeners = new ArrayList<>();
processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
}
@@ -76,7 +76,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
@Override
public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
AtomicInteger triggerTaskIndex = new AtomicInteger(1);
- List<ActivityImpl> activities = new ArrayList<ActivityImpl>(processDefinition.getActivities());
+ List<ActivityImpl> activities = new ArrayList<>(processDefinition.getActivities());
recurse(activities, triggerTaskIndex);
}
@@ -103,7 +103,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
// cause the process to die.
List<PvmTransition> outTransitions =
- new ArrayList<PvmTransition>(activity.getOutgoingTransitions());
+ new ArrayList<>(activity.getOutgoingTransitions());
for (PvmTransition transition : outTransitions) {
String triggerTaskId = "WorkflowExceptionTriggerTask_" + triggerTaskIndex;
@@ -112,7 +112,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
ClassDelegateActivityBehavior behavior = new ClassDelegateActivityBehavior(
WorkflowExceptionTriggerTask.class.getName(),
- new ArrayList<FieldDeclaration>(0));
+ new ArrayList<>(0));
triggerTask.setActivityBehavior(behavior);
triggerTask.setName("Workflow Exception Trigger Task " + triggerTaskIndex);
@@ -124,7 +124,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
transitionImpl.setDestination(triggerTask);
}
} else if ("subProcess".equals(type)) {
- recurse(new ArrayList<ActivityImpl>(activity.getActivities()), triggerTaskIndex);
+ recurse(new ArrayList<>(activity.getActivities()), triggerTaskIndex);
}
}
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
index c2b832812e..1fc43baef8 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
@@ -64,10 +64,10 @@ public final class XmlTool {
private static final Map<String, Integer> ENTITIES = new HashMap<>();
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL);
static {
- ENTITIES.put("amp", new Integer(38));
- ENTITIES.put("quot", new Integer(34));
- ENTITIES.put("lt", new Integer(60));
- ENTITIES.put("gt", new Integer(62));
+ ENTITIES.put("amp", 38);
+ ENTITIES.put("quot", 34);
+ ENTITIES.put("lt", 60);
+ ENTITIES.put("gt", 62);
}
/**
@@ -130,7 +130,7 @@ public final class XmlTool {
/**
* Encodes a value so it can be used inside an XML text element.
- * @param s the string to encode
+ * @param value the string to encode
* @return the encoded string
*/
public static String encode(Object value) {
@@ -155,7 +155,7 @@ public final class XmlTool {
out.append("&amp;");
modified = true;
} else if (c < 32 || c > 126) {
- out.append("&#" + (int)c + ";");
+ out.append("&#").append((int) c).append(";");
modified = true;
} else {
out.append(c);
@@ -171,7 +171,7 @@ public final class XmlTool {
/**
* Encodes a value so it can be used inside an XML attribute.
- * @param s the string to encode
+ * @param value the string to encode
* @return the encoded string
*/
public static String encodeAttr(Object value) {
@@ -199,7 +199,7 @@ public final class XmlTool {
out.append("&amp;");
modified = true;
} else if (c < 32 || c > 126) {
- out.append("&#" + (int)c + ";");
+ out.append("&#").append((int) c).append(";");
modified = true;
} else {
out.append(c);
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
index 9730b129be..2d204c338a 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -55,7 +55,7 @@ public class TestBaseTask {
@Test
@Deployment(resources={"BaseTaskTest.bpmn"})
public void shouldInvokeService() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("firstName", "Jane");
variables.put("lastName", "Doe");
variables.put("age", (Integer)25);
diff --git a/bpmn/MSOInfrastructureBPMN/pom.xml b/bpmn/MSOInfrastructureBPMN/pom.xml
index 908fcce276..a72240955a 100644
--- a/bpmn/MSOInfrastructureBPMN/pom.xml
+++ b/bpmn/MSOInfrastructureBPMN/pom.xml
@@ -1,7 +1,7 @@
<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.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
@@ -281,17 +281,17 @@
<version>3.4</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCommonBPMN</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCommonBPMN</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
@@ -299,7 +299,7 @@
</dependency>
<dependency>
<!-- unit test utilities -->
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
@@ -317,7 +317,7 @@
<version>4.3.2.RELEASE</version>
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSORESTClient</artifactId>
<version>${project.version}</version>
</dependency>
@@ -420,7 +420,7 @@
<!--for yang tools-->
<!-- <dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index d15be38042..cfdc0e9bfa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -32,17 +32,20 @@ import org.openecomp.mso.bpmn.common.scripts.AaiUtil
import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils;
import org.openecomp.mso.bpmn.core.RollbackData
import org.openecomp.mso.bpmn.core.WorkflowException
import org.openecomp.mso.rest.APIResponse;
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
+import java.util.List;
import java.util.UUID;
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.runtime.Execution
import org.json.JSONObject;
+import org.json.JSONArray;
import org.apache.commons.lang3.*
import org.apache.commons.codec.binary.Base64;
import org.springframework.web.util.UriUtils;
@@ -77,6 +80,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
String Prefix="DCRESI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
+ CatalogDbUtils cutils = new CatalogDbUtils()
public void preProcessRequest (Execution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -172,7 +176,47 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
+
+ public void prepareDecomposeService(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("modelUuid")
+ //here modelVersion is not set, we use modelUuid to decompose the service.
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelUuid}",
+ "modelVersion":""
+ }"""
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ utils.log("DEBUG", " ***** Completed prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void processDecomposition (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled)
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void doServiceHoming(Execution execution) {
+ //Now Homing is not clear. So to be implemented.
+ }
+
public void postProcessAAIGET(Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
@@ -402,7 +446,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
String nsServiceName = resourceType + "_" + serviceInstanceName
execution.setVariable("nsServiceName", nsServiceName)
- utils.log("INFO", "Prepare VFC Request nsServiceName:" + nsServiceName, isDebugEnabled)
+ utils.log("INFO", "Prepare Resource Request nsServiceName:" + nsServiceName, isDebugEnabled)
String globalSubscriberId = execution.getVariable("globalSubscriberId")
String serviceType = execution.getVariable("serviceType")
String serviceId = execution.getVariable("serviceInstanceId")
@@ -412,7 +456,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")
execution.setVariable("nsServiceDescription", nsServiceDescription)
- utils.log("INFO", "Prepare VFC Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
+ utils.log("INFO", "Prepare Resource Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
//reset the variables
execution.setVariable("resourceUUID", "")
@@ -427,18 +471,102 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("resourceUUID", resourceUUID)
execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)
execution.setVariable("resourceParameters", resourceParameters)
- utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled)
- utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled)
- utils.log("INFO", "Prepare VFC Request resourceParameters:" + resourceParameters, isDebugEnabled)
+ utils.log("INFO", "Prepare Resource Request resourceType:" + resourceType, isDebugEnabled)
+ utils.log("INFO", "Prepare Resource Request resourceUUID:" + resourceUUID, isDebugEnabled)
+ utils.log("INFO", "Prepare Resource Request resourceParameters:" + resourceParameters, isDebugEnabled)
}
}
- utils.log("INFO", "Prepare VFC Request finished", isDebugEnabled)
+ utils.log("INFO", "Prepare Controller Request finished", isDebugEnabled)
+ }
+ /**
+ * sequence resource. we should analyze resource sequence from service template
+ * Here we make VF first, and then network for E2E service.
+ */
+ public void sequenceResoure(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start sequenceResoure Process ======== ", isDebugEnabled)
+ String serviceModelUUID = execution.getVariable("modelUuid")
+ JSONArray networks = cutils.getAllNetworksByServiceModelUuid(execution, serviceModelUUID)
+ utils.log("DEBUG", "obtained Network list: " + networks, isDebugEnabled)
+ if (networks == null) {
+ utils.log("INFO", "No matching networks in Catalog DB for serviceModelUUID=" + serviceModelUUID, isDebugEnabled)
+ }
+ String incomingRequest = execution.getVariable("uuiRequest")
+ String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
+ List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
+ // Only one match herenetwork
+ List<String> nsResources = new ArrayList<String>()
+ List<String> wanResources = new ArrayList<String>()
+ List<String> resourceSequence = new ArrayList<String>()
+ for(String resource : resourceList){
+ String resourceName = jsonUtil.getJsonValue(resource, "resourceName")
+ String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId")
+ //check is network.
+ boolean isNetwork = false;
+ if(networks != null){
+ for(int i = 0; i < networks.size(); i++){
+ String networkUUID = jsonUtil.getJsonValueForKey(networks.get(i), "modelVersionId")
+ if(StringUtils.equals(resourceUUID, networkUUID)){
+ isNetwork = true
+ break
+ }
+ }
+ }
+ if(isNetwork){
+ wanResources.add(resourceName)
+ }else{
+ nsResources.add(resourceName)
+ }
+ }
+ resourceSequence.addAll(nsResources)
+ resourceSequence.addAll(wanResources)
+ String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("resourceSequence", resourceSequence)
+ utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled)
+ execution.setVariable("wanResources", wanResources)
+ utils.log("INFO", "======== COMPLETED sequenceResoure Process ======== ", isDebugEnabled)
}
+ public void getCurrentResoure(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start getCurrentResoure Process ======== ", isDebugEnabled)
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ List<String> wanResources = execution.getVariable("wanResources")
+ String resourceName = resourceSequence.get(currentIndex)
+ execution.setVariable("resourceType",resourceName)
+ if(wanResources.contains(resourceName)){
+ execution.setVariable("controllerInfo", "SDN-C")
+ }else{
+ execution.setVariable("controllerInfo", "VF-C")
+ }
+ utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)
+ }
+
/**
- * post config request.
+ * sequence resource
*/
- public void postConfigRequest(execution){
- //now do noting
- }
+ public void parseNextResource(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start parseNextResource Process ======== ", isDebugEnabled)
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ if(nextIndex >= resourceSequence.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled)
+ }
+
+ /**
+ * post config request.
+ */
+ public void postConfigRequest(execution){
+ //now do noting
+ }
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index ecc1488cbc..bf61013c76 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -35,6 +35,7 @@ import org.openecomp.mso.rest.APIResponse;
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
+import java.util.List;
import java.util.UUID;
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
@@ -589,5 +590,72 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
}
utils.log("INFO", " ======== END preResourceDelete Process ======== ", isDebugEnabled)
}
+
+ public void sequenceResource(execution){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+ utils.log("INFO", " ======== STARTED sequenceResource Process ======== ", isDebugEnabled)
+ List<String> nsResources = new ArrayList<String>()
+ List<String> wanResources = new ArrayList<String>()
+ List<String> resourceSequence = new ArrayList<String>()
+
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
+
+
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+ List relationShipList = jsonSlurper.parseText(serviceRelationShip)
+
+ if (relationShipList != null) {
+ relationShipList.each {
+ if(StringUtils.containsIgnoreCase(it.resourceType, "overlay") || StringUtils.containsIgnoreCase(it.resourceType, "underlay")){
+ wanResources.add(it.resourceType)
+ }else{
+ nsResources.add(it.resourceType)
+ }
+ }
+ }
+ resourceSequence.addAll(wanResources)
+ resourceSequence.addAll(nsResources)
+ String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+ execution.setVariable("isContainsWanResource", isContainsWanResource)
+ execution.setVariable("currentResourceIndex", 0)
+ execution.setVariable("resourceSequence", resourceSequence)
+ utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled)
+ execution.setVariable("wanResources", wanResources)
+ utils.log("INFO", " ======== END sequenceResource Process ======== ", isDebugEnabled)
+ }
+
+ public void getCurrentResource(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start getCurrentResoure Process ======== ", isDebugEnabled)
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ List<String> wanResources = execution.getVariable("wanResources")
+ String resourceName = resourceSequence.get(currentIndex)
+ execution.setVariable("resourceType",resourceName)
+ if(wanResources.contains(resourceName)){
+ execution.setVariable("controllerInfo", "SDN-C")
+ }else{
+ execution.setVariable("controllerInfo", "VF-C")
+ }
+ utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)
+ }
+
+ public void parseNextResource(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start parseNextResource Process ======== ", isDebugEnabled)
+ def currentIndex = execution.getVariable("currentResourceIndex")
+ def nextIndex = currentIndex + 1
+ execution.setVariable("currentResourceIndex", nextIndex)
+ List<String> resourceSequence = execution.getVariable("resourceSequence")
+ if(nextIndex >= resourceSequence.size()){
+ execution.setVariable("allResourceFinished", "true")
+ }else{
+ execution.setVariable("allResourceFinished", "false")
+ }
+ utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled)
+ }
+
}
\ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index dd6d4514bc..e1cae802e7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -1,753 +1,835 @@
-/*
- * ============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.openecomp.mso.bpmn.vcpe.scripts;
-
-import groovy.xml.XmlUtil
-import groovy.json.*
-
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
-import org.openecomp.mso.bpmn.common.scripts.VidUtils
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.domain.*
-
-import java.util.UUID;
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.json.JSONObject;
-import org.json.JSONArray;
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils;
-import static org.apache.commons.lang3.StringUtils.*
-
-/**
- * This groovy class supports the <class>CreateVcpeResCustService.bpmn</class> process.
- *
- * @author ek1439
- *
- */
-public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
-
- private static final String DebugFlag = "isDebugLogEnabled"
-
- String Prefix="CVRCS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
- JsonUtils jsonUtil = new JsonUtils()
- VidUtils vidUtils = new VidUtils()
- CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
-
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public InitializeProcessVariables(Execution execution){
- /* Initialize all the process variables in this block */
-
- execution.setVariable("createVcpeServiceRequest", "")
- execution.setVariable("globalSubscriberId", "")
- execution.setVariable("serviceInstanceName", "")
- execution.setVariable("msoRequestId", "")
- execution.setVariable(Prefix+"VnfsCreatedCount", 0)
- execution.setVariable("productFamilyId", "")
- execution.setVariable("brgWanMacAddress", "")
-
- //TODO
- execution.setVariable("sdncVersion", "1707")
- }
-
- // **************************************************
- // Pre or Prepare Request Section
- // **************************************************
- /**
- * This method is executed during the preProcessRequest task of the <class>CreateServiceInstance.bpmn</class> process.
- * @param execution
- */
- public void preProcessRequest (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- execution.setVariable("prefix",Prefix)
-
- utils.log("DEBUG", " ***** Inside preProcessRequest CreateVcpeResCustService Request ***** ", isDebugEnabled)
-
- try {
- // initialize flow variables
- InitializeProcessVariables(execution)
-
- //Config Inputs
- String aaiDistDelay = execution.getVariable('URN_mso_workflow_aai_distribution_delay')
- if (isBlank(aaiDistDelay)) {
- msg = "URN_mso_workflow_aai_distribution_delay is null"
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- execution.setVariable("aaiDistDelay", aaiDistDelay)
- utils.log("DEBUG","AAI distribution delay: " + aaiDistDelay, isDebugEnabled)
-
- // check for incoming json message/input
- String createVcpeServiceRequest = execution.getVariable("bpmnRequest")
- utils.logAudit(createVcpeServiceRequest)
- execution.setVariable("createVcpeServiceRequest", createVcpeServiceRequest);
- println 'createVcpeServiceRequest - ' + createVcpeServiceRequest
-
- // extract requestId
- String requestId = execution.getVariable("mso-request-id")
- execution.setVariable("msoRequestId", requestId)
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
- serviceInstanceId = UUID.randomUUID().toString()
- utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled)
- } else {
- utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled)
- }
-
- serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
- execution.setVariable("serviceInstanceId", serviceInstanceId)
-
- String requestAction = execution.getVariable("requestAction")
- execution.setVariable("requestAction", requestAction)
-
- setBasicDBAuthHeader(execution, isDebugEnabled)
-
- String source = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.source")
- if ((source == null) || (source.isEmpty())) {
- source = "VID"
- }
- execution.setVariable("source", source)
-
- // extract globalSubscriberId
- String globalSubscriberId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.subscriberInfo.globalSubscriberId")
-
- // verify element global-customer-id is sent from JSON input, throw exception if missing
- if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
- String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
- } else {
- execution.setVariable("globalSubscriberId", globalSubscriberId)
- execution.setVariable("globalCustomerId", globalSubscriberId)
- }
-
- // extract subscriptionServiceType
- String subscriptionServiceType = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
-
- String suppressRollback = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.suppressRollback")
- execution.setVariable("disableRollback", suppressRollback)
- utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
-
- String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.productFamilyId")
- execution.setVariable("productFamilyId", productFamilyId)
- utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
-
- String subscriberInfo = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.subscriberInfo")
- execution.setVariable("subscriberInfo", subscriberInfo)
- utils.log("DEBUG", "Incoming subscriberInfo is: " + subscriberInfo, isDebugEnabled)
-
- /*
- * Extracting User Parameters from incoming Request and converting into a Map
- */
- def jsonSlurper = new JsonSlurper()
- def jsonOutput = new JsonOutput()
-
- Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)
-
- //InputParams
- def userParams = reqMap.requestDetails?.requestParameters?.userParams
+/*
+ * ============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.openecomp.mso.bpmn.vcpe.scripts;
+
+import groovy.xml.XmlUtil
+import groovy.json.*
+
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+import org.openecomp.mso.bpmn.common.scripts.VidUtils
+import org.openecomp.mso.bpmn.core.RollbackData
+import org.openecomp.mso.bpmn.core.WorkflowException
+import org.openecomp.mso.bpmn.core.domain.*
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.json.JSONObject;
+import org.json.JSONArray;
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils;
+import static org.apache.commons.lang3.StringUtils.*
+
+/**
+ * This groovy class supports the <class>CreateVcpeResCustService.bpmn</class> process.
+ *
+ * @author ek1439
+ *
+ */
+public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
+
+ private static final String DebugFlag = "isDebugLogEnabled"
+
+ String Prefix="CVRCS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ VidUtils vidUtils = new VidUtils()
+ CatalogDbUtils catalogDbUtils = new CatalogDbUtils()
+
+ /**
+ * This method is executed during the preProcessRequest task of the
+ * <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public InitializeProcessVariables(Execution execution){
+ /* Initialize all the process variables in this block */
+
+ execution.setVariable("createVcpeServiceRequest", "")
+ execution.setVariable("globalSubscriberId", "")
+ execution.setVariable("serviceInstanceName", "")
+ execution.setVariable("msoRequestId", "")
+ execution.setVariable(Prefix+"VnfsCreatedCount", 0)
+ execution.setVariable("productFamilyId", "")
+ execution.setVariable("brgWanMacAddress", "")
+ execution.setVariable("customerLocation", "")
+
+ //TODO
+ execution.setVariable("sdncVersion", "1707")
+ }
+
+ // **************************************************
+ // Pre or Prepare Request Section
+ // **************************************************
+ /**
+ * This method is executed during the preProcessRequest task of the
+ * <class>CreateServiceInstance.bpmn</class> process.
+ * @param execution
+ */
+ public void preProcessRequest (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ execution.setVariable("prefix",Prefix)
+
+ utils.log("DEBUG", " ***** Inside preProcessRequest CreateVcpeResCustService Request ***** ", isDebugEnabled)
+
+ try {
+ // initialize flow variables
+ InitializeProcessVariables(execution)
+
+ //Config Inputs
+ String aaiDistDelay = execution.getVariable('URN_mso_workflow_aai_distribution_delay')
+ if (isBlank(aaiDistDelay)) {
+ msg = "URN_mso_workflow_aai_distribution_delay is null"
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("aaiDistDelay", aaiDistDelay)
+ utils.log("DEBUG","AAI distribution delay: " + aaiDistDelay, isDebugEnabled)
+
+ // check for incoming json message/input
+ String createVcpeServiceRequest = execution.getVariable("bpmnRequest")
+ utils.logAudit(createVcpeServiceRequest)
+ execution.setVariable("createVcpeServiceRequest", createVcpeServiceRequest);
+ println 'createVcpeServiceRequest - ' + createVcpeServiceRequest
+
+ // extract requestId
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ if ((serviceInstanceId == null) || (serviceInstanceId.isEmpty())) {
+ serviceInstanceId = UUID.randomUUID().toString()
+ utils.log("DEBUG", " Generated new Service Instance: " + serviceInstanceId , isDebugEnabled)
+ } else {
+ utils.log("DEBUG", "Using provided Service Instance ID: " + serviceInstanceId , isDebugEnabled)
+ }
+
+ serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
+ execution.setVariable("serviceInstanceId", serviceInstanceId)
+
+ String requestAction = execution.getVariable("requestAction")
+ execution.setVariable("requestAction", requestAction)
+
+ setBasicDBAuthHeader(execution, isDebugEnabled)
+
+ String source = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.source")
+ if ((source == null) || (source.isEmpty())) {
+ source = "VID"
+ }
+ execution.setVariable("source", source)
+
+ // extract globalSubscriberId
+ String globalSubscriberId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.subscriberInfo.globalSubscriberId")
+
+ // verify element global-customer-id is sent from JSON input, throw exception if missing
+ if ((globalSubscriberId == null) || (globalSubscriberId.isEmpty())) {
+ String dataErrorMessage = " Element 'globalSubscriberId' is missing. "
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
+
+ } else {
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ execution.setVariable("globalCustomerId", globalSubscriberId)
+ }
+
+ // extract subscriptionServiceType
+ String subscriptionServiceType = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.requestParameters.subscriptionServiceType")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
+ utils.log("DEBUG", "Incoming subscriptionServiceType is: " + subscriptionServiceType, isDebugEnabled)
+
+ String suppressRollback = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.requestInfo.suppressRollback")
+ execution.setVariable("disableRollback", suppressRollback)
+ utils.log("DEBUG", "Incoming Suppress/Disable Rollback is: " + suppressRollback, isDebugEnabled)
+
+ String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG", "Incoming productFamilyId is: " + productFamilyId, isDebugEnabled)
+
+ String subscriberInfo = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.subscriberInfo")
+ execution.setVariable("subscriberInfo", subscriberInfo)
+ utils.log("DEBUG", "Incoming subscriberInfo is: " + subscriberInfo, isDebugEnabled)
+
+ /*
+ * Extracting User Parameters from incoming Request and converting into a Map
+ */
+ def jsonSlurper = new JsonSlurper()
+ def jsonOutput = new JsonOutput()
+
+ Map reqMap = jsonSlurper.parseText(createVcpeServiceRequest)
+
- Map<String, String> inputMap = [:]
-
-
- if (userParams) {
- userParams.each {
- userParam ->
- if("BRG_WAN_MAC_Address".equals(userParam?.name)) {
- execution.setVariable("brgWanMacAddress", userParam.value)
- inputMap.put("BRG_WAN_MAC_Address", userParam.value)
- }
- }
- }
-
- utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
- execution.setVariable("serviceInputParams", inputMap)
-
- utils.log("DEBUG", "Incoming brgWanMacAddress is: " + execution.getVariable('brgWanMacAddress'), isDebugEnabled)
-
- //For Completion Handler & Fallout Handler
- String requestInfo =
- """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>"""
-
- execution.setVariable(Prefix+"requestInfo", requestInfo)
-
- utils.log("DEBUG", " ***** Completed preProcessRequest CreateVcpeResCustService Request ***** ", isDebugEnabled)
-
- } catch (BpmnError e) {
- throw e;
-
- } catch (Exception ex){
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected from method preProcessRequest() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void sendSyncResponse(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- String requestId = execution.getVariable("mso-request-id")
-
- // RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse ="""{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
-
- utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
- sendWorkflowResponse(execution, 202, syncResponse)
-
- } catch (Exception ex) {
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected from method sendSyncResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- //
- // *******************************
- public void prepareDecomposeService(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareDecomposeService of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
-
- //serviceModelInfo JSON string will be used as-is for DoCreateServiceInstance BB
- String serviceModelInfo = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.modelInfo")
- execution.setVariable("serviceModelInfo", serviceModelInfo)
-
- utils.log("DEBUG", " ***** Completed prepareDecomposeService of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- //
- // *******************************
- public void prepareCreateServiceInstance(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareCreateServiceInstance of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- /*
- * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
- * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
- *
- */
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
-// String serviceInputParams = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestParameters")
-// execution.setVariable("serviceInputParams", serviceInputParams)
-
-
- String serviceInstanceName = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.instanceName")
- execution.setVariable("serviceInstanceName", serviceInstanceName)
-
- ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonStringNoRootName())
-
- utils.log("DEBUG", " ***** Completed prepareCreateServiceInstance of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void postProcessServiceInstanceCreate (Execution execution){
- def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +'execution=' + execution.getId() +')'
- def isDebugLogEnabled = execution.getVariable(DebugFlag)
- logDebug('Entered ' + method, isDebugLogEnabled)
-
- String requestId = execution.getVariable("mso-request-id")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
-
- try {
-
- String payload = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <req:updateInfraRequest>
- <requestId>${requestId}</requestId>
- <lastModifiedBy>BPEL</lastModifiedBy>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- <serviceInstanceName>${serviceInstanceName}</serviceInstanceName>
- </req:updateInfraRequest>
- </soapenv:Body>
- </soapenv:Envelope>
- """
- execution.setVariable(Prefix+"setUpdateDbInstancePayload", payload)
- utils.logAudit(Prefix+"setUpdateDbInstancePayload: " + payload)
- logDebug('Exited ' + method, isDebugLogEnabled)
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception e) {
- logError('Caught exception in ' + method, e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
- }
- }
-
-
- public void processDecomposition (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- utils.log("DEBUG", " ***** Inside processDecomposition() of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- try {
-
- ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
-
- // VNFs
- List<VnfResource> vnfList = serviceDecomposition.getServiceVnfs()
- filterVnfs(vnfList)
- serviceDecomposition.setServiceVnfs(vnfList)
-
- execution.setVariable("vnfList", vnfList)
- execution.setVariable("vnfListString", vnfList.toString())
-
- String vnfModelInfoString = ""
- if (vnfList != null && vnfList.size() > 0) {
- execution.setVariable(Prefix+"VNFsCount", vnfList.size())
- utils.log("DEBUG", "vnfs to create: "+ vnfList.size(), isDebugEnabled)
- ModelInfo vnfModelInfo = vnfList[0].getModelInfo()
-
- vnfModelInfoString = vnfModelInfo.toString()
- String vnfModelInfoWithRoot = vnfModelInfo.toString()
- vnfModelInfoString = jsonUtil.getJsonValue(vnfModelInfoWithRoot, "modelInfo")
- } else {
- execution.setVariable(Prefix+"VNFsCount", 0)
- utils.log("DEBUG", "no vnfs to create based upon serviceDecomposition content", isDebugEnabled)
- }
-
- execution.setVariable("vnfModelInfo", vnfModelInfoString)
- execution.setVariable("vnfModelInfoString", vnfModelInfoString)
- utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed processDecomposition() of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- sendSyncError(execution)
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. processDecomposition() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- private void filterVnfs(List<VnfResource> vnfList) {
- if(vnfList == null) {
- return
- }
-
- // remove BRG & TXC from VNF list
-
- Iterator<VnfResource> it = vnfList.iterator()
- while(it.hasNext()) {
- VnfResource vr = it.next()
-
- String role = vr.getNfRole()
- if(role == "BRG" || role == "TunnelXConn") {
- it.remove()
- }
- }
- }
-
-
- public void prepareCreateAllottedResourceTXC(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareCreateAllottedResourceTXC of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- /*
- * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
- * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
- *
- */
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
- ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
-
- //allottedResourceModelInfo
- //allottedResourceRole
- //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
- //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this BB will query the full model from the Catalog DB.
- List<AllottedResource> allottedResources = serviceDecomposition.getServiceAllottedResources()
- if (allottedResources != null) {
- Iterator iter = allottedResources.iterator();
- while (iter.hasNext()){
- AllottedResource allottedResource = (AllottedResource)iter.next();
-
- utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName(), isDebugEnabled)
- utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType(), isDebugEnabled)
- if("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
- //set create flag to true
- execution.setVariable("createTXCAR", true)
- ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
- execution.setVariable("allottedResourceModelInfoTXC", allottedResourceModelInfo.toJsonStringNoRootName())
- execution.setVariable("allottedResourceRoleTXC", allottedResource.getAllottedResourceRole())
- execution.setVariable("allottedResourceTypeTXC", allottedResource.getAllottedResourceType())
- //After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the TXC,
- //and in its homingSolution section should be found the infraServiceInstanceId (i.e. infraServiceInstanceId in TXC Allotted Resource structure) (which the Homing BB would have populated).
- execution.setVariable("parentServiceInstanceIdTXC", allottedResource.getHomingSolution().getServiceInstanceId())
- }
- }
- }
-
- //unit test only
- String allottedResourceId = execution.getVariable("allottedResourceId")
- execution.setVariable("allottedResourceIdTXC", allottedResourceId)
- utils.log("DEBUG", "setting allottedResourceId CreateVcpeResCustService "+allottedResourceId, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed prepareCreateAllottedResourceTXC of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceTXC flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
- public void prepareCreateAllottedResourceBRG(Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareCreateAllottedResourceBRG of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- /*
- * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from DecompositionObject
- * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
- *
- */
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
- ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
-
- //allottedResourceModelInfo
- //allottedResourceRole
- //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
- //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this BB will query the full model from the Catalog DB.
- List<AllottedResource> allottedResources = serviceDecomposition.getServiceAllottedResources()
- if (allottedResources != null) {
- Iterator iter = allottedResources.iterator();
- while (iter.hasNext()){
- AllottedResource allottedResource = (AllottedResource)iter.next();
-
- utils.log("DEBUG", " getting model info for AllottedResource # :" + allottedResource.toJsonStringNoRootName(), isDebugEnabled)
- utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" + allottedResource.getAllottedResourceType(), isDebugEnabled)
- if("BRG".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
- //set create flag to true
- execution.setVariable("createBRGAR", true)
- ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
- execution.setVariable("allottedResourceModelInfoBRG", allottedResourceModelInfo.toJsonStringNoRootName())
- execution.setVariable("allottedResourceRoleBRG", allottedResource.getAllottedResourceRole())
- execution.setVariable("allottedResourceTypeBRG", allottedResource.getAllottedResourceType())
- //After decomposition and homing BBs, there should be an allotted resource object in the decomposition that represents the BRG,
- //and in its homingSolution section should be found the infraServiceInstanceId (i.e. infraServiceInstanceId in BRG Allotted Resource structure) (which the Homing BB would have populated).
- execution.setVariable("parentServiceInstanceIdBRG", allottedResource.getHomingSolution().getServiceInstanceId())
- }
- }
- }
-
- //unit test only
- String allottedResourceId = execution.getVariable("allottedResourceId")
- execution.setVariable("allottedResourceIdBRG", allottedResourceId)
- utils.log("DEBUG", "setting allottedResourceId CreateVcpeResCustService "+allottedResourceId, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed prepareCreateAllottedResourceBRG of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceBRG flow. Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
-
-
- // *******************************
- // Generate Network request Section
- // *******************************
- public void prepareVnfAndModulesCreate (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside prepareVnfAndModulesCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- // String disableRollback = execution.getVariable("disableRollback")
- // def backoutOnFailure = ""
- // if(disableRollback != null){
- // if ( disableRollback == true) {
- // backoutOnFailure = "false"
- // } else if ( disableRollback == false) {
- // backoutOnFailure = "true"
- // }
- // }
- //failIfExists - optional
-
- String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
- String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.requestInfo.productFamilyId")
- execution.setVariable("productFamilyId", productFamilyId)
- utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled)
-
- List<VnfResource> vnfList = execution.getVariable("vnfList")
-
- Integer vnfsCreatedCount = execution.getVariable(Prefix+"VnfsCreatedCount")
- String vnfModelInfoString = null;
-
- if (vnfList != null && vnfList.size() > 0 ) {
- utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled)
- ModelInfo vnfModelInfo1 = vnfList[0].getModelInfo()
- utils.log("DEBUG", "got 0 ", isDebugEnabled)
- ModelInfo vnfModelInfo = vnfList[vnfsCreatedCount.intValue()].getModelInfo()
- vnfModelInfoString = vnfModelInfo.toString()
- } else {
- //TODO: vnfList does not contain data. Need to investigate why ... . Fro VCPE use model stored
- vnfModelInfoString = execution.getVariable("vnfModelInfo")
- }
-
- utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
-
- // extract cloud configuration
- String lcpCloudRegionId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.cloudConfiguration.lcpCloudRegionId")
- execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
- utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
- String tenantId = jsonUtil.getJsonValue(createVcpeServiceRequest, "requestDetails.cloudConfiguration.tenantId")
- execution.setVariable("tenantId", tenantId)
- utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
-
- String sdncVersion = execution.getVariable("sdncVersion")
- utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
-
- utils.log("DEBUG", " ***** Completed prepareVnfAndModulesCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *******************************
- // Validate Vnf request Section -> increment count
- // *******************************
- public void validateVnfCreate (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- try {
- utils.log("DEBUG", " ***** Inside validateVnfCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- Integer vnfsCreatedCount = execution.getVariable(Prefix+"VnfsCreatedCount")
- vnfsCreatedCount++
-
- execution.setVariable(Prefix+"VnfsCreatedCount", vnfsCreatedCount)
-
- utils.log("DEBUG", " ***** Completed validateVnfCreate of CreateVcpeResCustService ***** "+" vnf # "+vnfsCreatedCount, isDebugEnabled)
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- // *****************************************
- // Prepare Completion request Section
- // *****************************************
- public void postProcessResponse (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- utils.log("DEBUG", " ***** Inside postProcessResponse of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- try {
- String source = execution.getVariable("source")
- String requestId = execution.getVariable("mso-request-id")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- String msoCompletionRequest =
- """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1">
- <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
- <request-id>${requestId}</request-id>
- <action>CREATE</action>
- <source>${source}</source>
- </request-info>
- <status-message>Service Instance has been created successfully via macro orchestration</status-message>
- <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
- <mso-bpel-name>BPMN macro create</mso-bpel-name>
- </aetgt:MsoCompletionRequest>"""
-
- // Format Response
- String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
-
- utils.logAudit(xmlMsoCompletionRequest)
- execution.setVariable(Prefix+"Success", true)
- execution.setVariable(Prefix+"CompleteMsoProcessRequest", xmlMsoCompletionRequest)
- utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- // try error in method block
- String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. Unexpected Error from method postProcessResponse() - " + ex.getMessage()
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- public void preProcessRollback (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- utils.log("DEBUG"," ***** preProcessRollback of CreateVcpeResCustService ***** ", isDebugEnabled)
- try {
-
- Object workflowException = execution.getVariable("WorkflowException");
-
- if (workflowException instanceof WorkflowException) {
- utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
- execution.setVariable("prevWorkflowException", workflowException);
- //execution.setVariable("WorkflowException", null);
- }
- } catch (BpmnError e) {
- utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
- } catch(Exception ex) {
- String msg = "Exception in preProcessRollback. " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
- }
- utils.log("DEBUG"," *** Exit preProcessRollback of CreateVcpeResCustService *** ", isDebugEnabled)
- }
-
- public void postProcessRollback (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- utils.log("DEBUG"," ***** postProcessRollback of CreateVcpeResCustService ***** ", isDebugEnabled)
- String msg = ""
- try {
- Object workflowException = execution.getVariable("prevWorkflowException");
- if (workflowException instanceof WorkflowException) {
- utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
- execution.setVariable("WorkflowException", workflowException);
- }
- } catch (BpmnError b) {
- utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
- throw b;
- } catch(Exception ex) {
- msg = "Exception in postProcessRollback. " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
- }
- utils.log("DEBUG"," *** Exit postProcessRollback of CreateVcpeResCustService *** ", isDebugEnabled)
- }
-
- public void prepareFalloutRequest(Execution execution){
- def isDebugEnabled=execution.getVariable(DebugFlag)
-
- utils.log("DEBUG", " *** STARTED CreateVcpeResCustService prepareFalloutRequest Process *** ", isDebugEnabled)
-
- try {
- WorkflowException wfex = execution.getVariable("WorkflowException")
- utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
- String requestInfo = execution.getVariable(Prefix+"requestInfo")
- utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
-
- //TODO. hmmm. there is no way to UPDATE error message.
-// String errorMessage = wfex.getErrorMessage()
-// boolean successIndicator = execution.getVariable("DCRESI_rolledBack")
-// if (successIndicator){
-// errorMessage = errorMessage + ". Rollback successful."
-// } else {
-// errorMessage = errorMessage + ". Rollback not completed."
-// }
-
- String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
-
- execution.setVariable(Prefix+"falloutRequest", falloutRequest)
-
- } catch (Exception ex) {
- utils.log("DEBUG", "Error Occured in CreateVcpeResCustService prepareFalloutRequest Process " + ex.getMessage(), isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVcpeResCustService prepareFalloutRequest Process")
- }
- utils.log("DEBUG", "*** COMPLETED CreateVcpeResCustService prepareFalloutRequest Process ***", isDebugEnabled)
- }
-
-
- public void sendSyncError (Execution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- execution.setVariable("prefix", Prefix)
-
- utils.log("DEBUG", " ***** Inside sendSyncError() of CreateVcpeResCustService ***** ", isDebugEnabled)
-
- try {
- String errorMessage = ""
- def wfe = execution.getVariable("WorkflowException")
- if (wfe instanceof WorkflowException) {
- errorMessage = wfe.getErrorMessage()
- } else {
- errorMessage = "Sending Sync Error."
- }
-
- String buildworkflowException =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>7000</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- utils.logAudit(buildworkflowException)
- sendWorkflowResponse(execution, 500, buildworkflowException)
- } catch (Exception ex) {
- utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
- }
- }
-
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable(DebugFlag)
- execution.setVariable("prefix",Prefix)
- try{
- utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
- execution.setVariable(Prefix+"unexpectedError", "Caught a Java Lang Exception") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
- }catch(BpmnError b){
- utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- execution.setVariable(Prefix+"unexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-}
+ //InputParams
+ def userParams = reqMap.requestDetails?.requestParameters?.userParams
+
+ Map<String, String> inputMap = [:]
+
+
+ if (userParams) {
+ userParams.each {
+ userParam ->
+ if("BRG_WAN_MAC_Address".equals(userParam?.name)) {
+ execution.setVariable("brgWanMacAddress", userParam.value)
+ inputMap.put("BRG_WAN_MAC_Address", userParam.value)
+ }
+ if("Customer_Location".equals(userParam?.name)) {
+ execution.setVariable("customerLocation", userParam.value)
+ userParam.value.each {
+ customerLocParam ->
+ inputMap.put(customerLocParam.key, customerLocParam.value)
+ }
+ }
+ }
+ }
+
+ utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
+ execution.setVariable("serviceInputParams", inputMap)
+
+ utils.log("DEBUG", "Incoming brgWanMacAddress is: " +
+ execution.getVariable('brgWanMacAddress'), isDebugEnabled)
+ utils.log("DEBUG", "Incoming customerLocation is: " +
+ execution.getVariable('customerLocation'), isDebugEnabled)
+
+ //For Completion Handler & Fallout Handler
+ String requestInfo =
+ """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>"""
+
+ execution.setVariable(Prefix+"requestInfo", requestInfo)
+
+ utils.log("DEBUG",
+ " ***** Completed preProcessRequest CreateVcpeResCustService Request ***** ", isDebugEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+
+ } catch (Exception ex){
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow." +
+ " Unexpected from method preProcessRequest() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void sendSyncResponse(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ utils.log("DEBUG", " ***** Inside sendSyncResponse of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ try {
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String requestId = execution.getVariable("mso-request-id")
+
+ // RESTResponse (for API Handler (APIH) Reply Task)
+ String syncResponse ="""{"requestReferences":{
+ "instanceId":"${serviceInstanceId}",
+ "requestId":"${requestId}"
+ }}""".trim()
+
+ utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected from method sendSyncResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareDecomposeService(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG",
+ " ***** Inside prepareDecomposeService of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+
+ //serviceModelInfo JSON string will be used as-is for DoCreateServiceInstance BB
+ String serviceModelInfo = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.modelInfo")
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+
+ utils.log("DEBUG",
+ " ***** Completed prepareDecomposeService of CreateVcpeResCustService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ //
+ // *******************************
+ public void prepareCreateServiceInstance(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG",
+ " ***** Inside prepareCreateServiceInstance of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from
+ * DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+// String serviceInputParams = jsonUtil.getJsonValue(createVcpeServiceRequest,
+// "requestDetails.requestParameters")
+// execution.setVariable("serviceInputParams", serviceInputParams)
+
+
+ String serviceInstanceName = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.requestInfo.instanceName")
+ execution.setVariable("serviceInstanceName", serviceInstanceName)
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ execution.setVariable("serviceDecompositionString", serviceDecomposition.toJsonStringNoRootName())
+
+ utils.log("DEBUG",
+ " ***** Completed prepareCreateServiceInstance of CreateVcpeResCustService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void postProcessServiceInstanceCreate (Execution execution){
+ def method = getClass().getSimpleName() + '.postProcessServiceInstanceCreate(' +
+ 'execution=' + execution.getId() +')'
+ def isDebugLogEnabled = execution.getVariable(DebugFlag)
+ logDebug('Entered ' + method, isDebugLogEnabled)
+
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceInstanceName = execution.getVariable("serviceInstanceName")
+
+ try {
+
+ String payload = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+xmlns:req="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <req:updateInfraRequest>
+ <requestId>${requestId}</requestId>
+ <lastModifiedBy>BPEL</lastModifiedBy>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <serviceInstanceName>${serviceInstanceName}</serviceInstanceName>
+ </req:updateInfraRequest>
+ </soapenv:Body>
+ </soapenv:Envelope>
+ """
+ execution.setVariable(Prefix+"setUpdateDbInstancePayload", payload)
+ utils.logAudit(Prefix+"setUpdateDbInstancePayload: " + payload)
+ logDebug('Exited ' + method, isDebugLogEnabled)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception e) {
+ logError('Caught exception in ' + method, e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
+ }
+ }
+
+
+ public void processDecomposition (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ utils.log("DEBUG", " ***** Inside processDecomposition() of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ try {
+
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ // VNFs
+ List<VnfResource> vnfList = serviceDecomposition.getServiceVnfs()
+ filterVnfs(vnfList)
+ serviceDecomposition.setServiceVnfs(vnfList)
+
+ execution.setVariable("vnfList", vnfList)
+ execution.setVariable("vnfListString", vnfList.toString())
+
+ String vnfModelInfoString = ""
+ if (vnfList != null && vnfList.size() > 0) {
+ execution.setVariable(Prefix+"VNFsCount", vnfList.size())
+ utils.log("DEBUG", "vnfs to create: "+ vnfList.size(), isDebugEnabled)
+ ModelInfo vnfModelInfo = vnfList[0].getModelInfo()
+
+ vnfModelInfoString = vnfModelInfo.toString()
+ String vnfModelInfoWithRoot = vnfModelInfo.toString()
+ vnfModelInfoString = jsonUtil.getJsonValue(vnfModelInfoWithRoot, "modelInfo")
+ } else {
+ execution.setVariable(Prefix+"VNFsCount", 0)
+ utils.log("DEBUG", "no vnfs to create based upon serviceDecomposition content", isDebugEnabled)
+ }
+
+ execution.setVariable("vnfModelInfo", vnfModelInfoString)
+ execution.setVariable("vnfModelInfoString", vnfModelInfoString)
+ utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ utils.log("DEBUG",
+ " ***** Completed processDecomposition() of CreateVcpeResCustService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ sendSyncError(execution)
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "processDecomposition() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ private void filterVnfs(List<VnfResource> vnfList) {
+ if(vnfList == null) {
+ return
+ }
+
+ // remove BRG & TXC from VNF list
+
+ Iterator<VnfResource> it = vnfList.iterator()
+ while(it.hasNext()) {
+ VnfResource vr = it.next()
+
+ String role = vr.getNfRole()
+ if(role == "BRG" || role == "TunnelXConn") {
+ it.remove()
+ }
+ }
+ }
+
+
+ public void prepareCreateAllottedResourceTXC(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG",
+ " ***** Inside prepareCreateAllottedResourceTXC of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from
+ * DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ //allottedResourceModelInfo
+ //allottedResourceRole
+ //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
+ //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this
+ //BB will query the full model from the Catalog DB.
+ List<AllottedResource> allottedResources = serviceDecomposition.getServiceAllottedResources()
+ if (allottedResources != null) {
+ Iterator iter = allottedResources.iterator();
+ while (iter.hasNext()){
+ AllottedResource allottedResource = (AllottedResource)iter.next();
+
+ utils.log("DEBUG", " getting model info for AllottedResource # :" +
+ allottedResource.toJsonStringNoRootName(), isDebugEnabled)
+ utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" +
+ allottedResource.getAllottedResourceType(), isDebugEnabled)
+ if("TunnelXConn".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
+ //set create flag to true
+ execution.setVariable("createTXCAR", true)
+ ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
+ execution.setVariable("allottedResourceModelInfoTXC",
+ allottedResourceModelInfo.toJsonStringNoRootName())
+ execution.setVariable("allottedResourceRoleTXC", allottedResource.getAllottedResourceRole())
+ execution.setVariable("allottedResourceTypeTXC", allottedResource.getAllottedResourceType())
+ //After decomposition and homing BBs, there should be an allotted resource object in the
+ // decomposition that represents the TXC,
+ //and in its homingSolution section should be found the infraServiceInstanceId
+ // (i.e. infraServiceInstanceId in TXC Allotted Resource structure) (which the Homing
+ // BB would have populated).
+ execution.setVariable("parentServiceInstanceIdTXC",
+ allottedResource.getHomingSolution().getServiceInstanceId())
+ }
+ }
+ }
+
+ //unit test only
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ execution.setVariable("allottedResourceIdTXC", allottedResourceId)
+ utils.log("DEBUG",
+ "setting allottedResourceId CreateVcpeResCustService "+ allottedResourceId, isDebugEnabled)
+
+ utils.log("DEBUG",
+ " ***** Completed prepareCreateAllottedResourceTXC of CreateVcpeResCustService ***** ",
+ isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceTXC flow. " +
+ "Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+ public void prepareCreateAllottedResourceBRG(Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG",
+ " ***** Inside prepareCreateAllottedResourceBRG of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ /*
+ * Service modelInfo is created in earlier step. This flow can use it as-is ... or, extract from
+ * DecompositionObject
+ * ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ * ModelInfo modelInfo = serviceDecomposition.getModelInfo()
+ *
+ */
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+
+ //allottedResourceModelInfo
+ //allottedResourceRole
+ //The model Info parameters are a JSON structure as defined in the Service Instantiation API.
+ //It would be sufficient to only include the service model UUID (i.e. the modelVersionId), since this
+ // BB will query the full model from the Catalog DB.
+ List<AllottedResource> allottedResources = serviceDecomposition.getServiceAllottedResources()
+ if (allottedResources != null) {
+ Iterator iter = allottedResources.iterator();
+ while (iter.hasNext()){
+ AllottedResource allottedResource = (AllottedResource)iter.next();
+
+ utils.log("DEBUG", " getting model info for AllottedResource # :" +
+ allottedResource.toJsonStringNoRootName(), isDebugEnabled)
+ utils.log("DEBUG", " allottedResource.getAllottedResourceType() :" +
+ allottedResource.getAllottedResourceType(), isDebugEnabled)
+ if("BRG".equalsIgnoreCase(allottedResource.getAllottedResourceType())){
+ //set create flag to true
+ execution.setVariable("createBRGAR", true)
+ ModelInfo allottedResourceModelInfo = allottedResource.getModelInfo()
+ execution.setVariable("allottedResourceModelInfoBRG",
+ allottedResourceModelInfo.toJsonStringNoRootName())
+ execution.setVariable("allottedResourceRoleBRG", allottedResource.getAllottedResourceRole())
+ execution.setVariable("allottedResourceTypeBRG", allottedResource.getAllottedResourceType())
+ //After decomposition and homing BBs, there should be an allotted resource object in the
+ // decomposition that represents the BRG,
+ //and in its homingSolution section should be found the infraServiceInstanceId
+ // (i.e. infraServiceInstanceId in BRG Allotted Resource structure) (which the Homing
+ // BB would have populated).
+ execution.setVariable("parentServiceInstanceIdBRG",
+ allottedResource.getHomingSolution().getServiceInstanceId())
+ }
+ }
+ }
+
+ //unit test only
+ String allottedResourceId = execution.getVariable("allottedResourceId")
+ execution.setVariable("allottedResourceIdBRG", allottedResourceId)
+ utils.log("DEBUG",
+ "setting allottedResourceId CreateVcpeResCustService " + allottedResourceId, isDebugEnabled)
+
+ utils.log("DEBUG",
+ " ***** Completed prepareCreateAllottedResourceBRG of CreateVcpeResCustService ***** ",
+ isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in prepareCreateAllottedResourceBRG flow. " +
+ "Unexpected Error from method prepareCreateServiceInstance() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+
+
+ // *******************************
+ // Generate Network request Section
+ // *******************************
+ public void prepareVnfAndModulesCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG",
+ " ***** Inside prepareVnfAndModulesCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ // String disableRollback = execution.getVariable("disableRollback")
+ // def backoutOnFailure = ""
+ // if(disableRollback != null){
+ // if ( disableRollback == true) {
+ // backoutOnFailure = "false"
+ // } else if ( disableRollback == false) {
+ // backoutOnFailure = "true"
+ // }
+ // }
+ //failIfExists - optional
+
+ String createVcpeServiceRequest = execution.getVariable("createVcpeServiceRequest")
+ String productFamilyId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.requestInfo.productFamilyId")
+ execution.setVariable("productFamilyId", productFamilyId)
+ utils.log("DEBUG","productFamilyId: "+ productFamilyId, isDebugEnabled)
+
+ List<VnfResource> vnfList = execution.getVariable("vnfList")
+
+ Integer vnfsCreatedCount = execution.getVariable(Prefix+"VnfsCreatedCount")
+ String vnfModelInfoString = null;
+
+ if (vnfList != null && vnfList.size() > 0 ) {
+ utils.log("DEBUG", "getting model info for vnf # " + vnfsCreatedCount, isDebugEnabled)
+ ModelInfo vnfModelInfo1 = vnfList[0].getModelInfo()
+ utils.log("DEBUG", "got 0 ", isDebugEnabled)
+ ModelInfo vnfModelInfo = vnfList[vnfsCreatedCount.intValue()].getModelInfo()
+ vnfModelInfoString = vnfModelInfo.toString()
+ } else {
+ //TODO: vnfList does not contain data. Need to investigate why ... . Fro VCPE use model stored
+ vnfModelInfoString = execution.getVariable("vnfModelInfo")
+ }
+
+ utils.log("DEBUG", " vnfModelInfoString :" + vnfModelInfoString, isDebugEnabled)
+
+ // extract cloud configuration
+ String lcpCloudRegionId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.cloudConfiguration.lcpCloudRegionId")
+ execution.setVariable("lcpCloudRegionId", lcpCloudRegionId)
+ utils.log("DEBUG","lcpCloudRegionId: "+ lcpCloudRegionId, isDebugEnabled)
+ String tenantId = jsonUtil.getJsonValue(createVcpeServiceRequest,
+ "requestDetails.cloudConfiguration.tenantId")
+ execution.setVariable("tenantId", tenantId)
+ utils.log("DEBUG","tenantId: "+ tenantId, isDebugEnabled)
+
+ String sdncVersion = execution.getVariable("sdncVersion")
+ utils.log("DEBUG","sdncVersion: "+ sdncVersion, isDebugEnabled)
+
+ utils.log("DEBUG",
+ " ***** Completed prepareVnfAndModulesCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected Error from method prepareVnfAndModulesCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *******************************
+ // Validate Vnf request Section -> increment count
+ // *******************************
+ public void validateVnfCreate (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ try {
+ utils.log("DEBUG", " ***** Inside validateVnfCreate of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ Integer vnfsCreatedCount = execution.getVariable(Prefix+"VnfsCreatedCount")
+ vnfsCreatedCount++
+
+ execution.setVariable(Prefix+"VnfsCreatedCount", vnfsCreatedCount)
+
+ utils.log("DEBUG",
+ " ***** Completed validateVnfCreate of CreateVcpeResCustService ***** "+" vnf # "+vnfsCreatedCount, isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected Error from method validateVnfCreate() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ // *****************************************
+ // Prepare Completion request Section
+ // *****************************************
+ public void postProcessResponse (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ utils.log("DEBUG", " ***** Inside postProcessResponse of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ try {
+ String source = execution.getVariable("source")
+ String requestId = execution.getVariable("mso-request-id")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String msoCompletionRequest =
+ """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1">
+ <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
+ <request-id>${requestId}</request-id>
+ <action>CREATE</action>
+ <source>${source}</source>
+ </request-info>
+ <status-message>Service Instance has been created successfully via macro orchestration</status-message>
+ <serviceInstanceId>${serviceInstanceId}</serviceInstanceId>
+ <mso-bpel-name>BPMN macro create</mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
+
+ // Format Response
+ String xmlMsoCompletionRequest = utils.formatXml(msoCompletionRequest)
+
+ utils.logAudit(xmlMsoCompletionRequest)
+ execution.setVariable(Prefix+"Success", true)
+ execution.setVariable(Prefix+"CompleteMsoProcessRequest", xmlMsoCompletionRequest)
+ utils.log("DEBUG", " SUCCESS flow, going to CompleteMsoProcess - " + "\n" + xmlMsoCompletionRequest, isDebugEnabled)
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in CreateVcpeResCustService flow. " +
+ "Unexpected Error from method postProcessResponse() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void preProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ utils.log("DEBUG"," ***** preProcessRollback of CreateVcpeResCustService ***** ", isDebugEnabled)
+ try {
+
+ Object workflowException = execution.getVariable("WorkflowException");
+
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Prev workflowException: " + workflowException.getErrorMessage(), isDebugEnabled)
+ execution.setVariable("prevWorkflowException", workflowException);
+ //execution.setVariable("WorkflowException", null);
+ }
+ } catch (BpmnError e) {
+ utils.log("DEBUG", "BPMN Error during preProcessRollback", isDebugEnabled)
+ } catch(Exception ex) {
+ String msg = "Exception in preProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit preProcessRollback of CreateVcpeResCustService *** ", isDebugEnabled)
+ }
+
+ public void postProcessRollback (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ utils.log("DEBUG"," ***** postProcessRollback of CreateVcpeResCustService ***** ", isDebugEnabled)
+ String msg = ""
+ try {
+ Object workflowException = execution.getVariable("prevWorkflowException");
+ if (workflowException instanceof WorkflowException) {
+ utils.log("DEBUG", "Setting prevException to WorkflowException: ", isDebugEnabled)
+ execution.setVariable("WorkflowException", workflowException);
+ }
+ } catch (BpmnError b) {
+ utils.log("DEBUG", "BPMN Error during postProcessRollback", isDebugEnabled)
+ throw b;
+ } catch(Exception ex) {
+ msg = "Exception in postProcessRollback. " + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ }
+ utils.log("DEBUG"," *** Exit postProcessRollback of CreateVcpeResCustService *** ", isDebugEnabled)
+ }
+
+ public void prepareFalloutRequest(Execution execution){
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+
+ utils.log("DEBUG", " *** STARTED CreateVcpeResCustService prepareFalloutRequest Process *** ", isDebugEnabled)
+
+ try {
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ utils.log("DEBUG", " Incoming Workflow Exception: " + wfex.toString(), isDebugEnabled)
+ String requestInfo = execution.getVariable(Prefix+"requestInfo")
+ utils.log("DEBUG", " Incoming Request Info: " + requestInfo, isDebugEnabled)
+
+ //TODO. hmmm. there is no way to UPDATE error message.
+// String errorMessage = wfex.getErrorMessage()
+// boolean successIndicator = execution.getVariable("DCRESI_rolledBack")
+// if (successIndicator){
+// errorMessage = errorMessage + ". Rollback successful."
+// } else {
+// errorMessage = errorMessage + ". Rollback not completed."
+// }
+
+ String falloutRequest = exceptionUtil.processMainflowsBPMNException(execution, requestInfo)
+
+ execution.setVariable(Prefix+"falloutRequest", falloutRequest)
+
+ } catch (Exception ex) {
+ utils.log("DEBUG",
+ "Error Occured in CreateVcpeResCustService prepareFalloutRequest Process " + ex.getMessage(),
+ isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500,
+ "Internal Error - Occured in CreateVcpeResCustService prepareFalloutRequest Process")
+ }
+ utils.log("DEBUG",
+ "*** COMPLETED CreateVcpeResCustService prepareFalloutRequest Process ***", isDebugEnabled)
+ }
+
+
+ public void sendSyncError (Execution execution) {
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ execution.setVariable("prefix", Prefix)
+
+ utils.log("DEBUG", " ***** Inside sendSyncError() of CreateVcpeResCustService ***** ", isDebugEnabled)
+
+ try {
+ String errorMessage = ""
+ def wfe = execution.getVariable("WorkflowException")
+ if (wfe instanceof WorkflowException) {
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ utils.logAudit(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+ } catch (Exception ex) {
+ utils.log("DEBUG", " Sending Sync Error Activity Failed. " + "\n" + ex.getMessage(), isDebugEnabled)
+ }
+ }
+
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable(DebugFlag)
+ execution.setVariable("prefix",Prefix)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception", isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ utils.log("DEBUG", "Variables List: " + execution.getVariables(), isDebugEnabled)
+ // Adding below line temporarily until this flows error handling gets updated
+ execution.setVariable(Prefix+"unexpectedError", "Caught a Java Lang Exception")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Caught a Java Lang Exception")
+ }catch(BpmnError b){
+ utils.log("ERROR", "Rethrowing MSOWorkflowException", isDebugEnabled)
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ // Adding below line temporarily until this flows error handling gets updated
+ execution.setVariable(Prefix+"unexpectedError", "Exception in processJavaException method")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception in processJavaException method")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
index 80b11bbdf5..dbf5a57f33 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplication.java
@@ -32,8 +32,8 @@ import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResource;
@ApplicationPath("/")
public class WorkflowResourceApplication extends Application {
- private Set<Object> singletons = new HashSet<Object>();
- private Set<Class<?>> classes = new HashSet<Class<?>>();
+ private Set<Object> singletons = new HashSet<>();
+ private Set<Class<?>> classes = new HashSet<>();
public WorkflowResourceApplication() {
singletons.add(new WorkflowResource());
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index dfa390c296..38a44ab1f6 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -150,7 +150,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
private String getPostStringBody(ResourceOperationStatus resourceOperationStatus) {
logger.info("AbstractSdncOperationTask.getPostStringBody begin!");
- String postBody = new String(postBodyTemplate);
+ String postBody = postBodyTemplate;
postBody = postBody.replace("$errorCode", resourceOperationStatus.getErrorCode());
postBody = postBody.replace("$jobId", resourceOperationStatus.getJobId());
postBody = postBody.replace("$operType", resourceOperationStatus.getOperType());
@@ -166,7 +166,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
private String getGetStringBody(String serviceId, String operationId, String resourceTemplateUUID) {
logger.info("AbstractSdncOperationTask.getGetStringBody begin!");
- String getBody = new String(getBodyTemplate);
+ String getBody = getBodyTemplate;
getBody = getBody.replace("$operationId", operationId);
getBody = getBody.replace("$resourceTemplateUUID", resourceTemplateUUID);
getBody = getBody.replace("$serviceId", serviceId);
@@ -319,7 +319,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
updateResOperStatus(resourceOperationStatus);
logger.info("AbstractSdncOperationTask.updateProgress end!");
} catch (Exception exception) {
- System.out.println(exception);
logger.info("exception: AbstractSdncOperationTask.updateProgress fail!");
logger.error("exception: AbstractSdncOperationTask.updateProgress fail:", exception);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " updateProgress catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, exception.getClass().toString());
@@ -403,7 +402,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
return vlaue;
}
} catch (Exception e) {
- System.out.println(e);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString());
}
return defaultValue;
@@ -416,7 +414,6 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
return vlaue;
}
} catch (Exception e) {
- System.out.println(e);
LOGGER.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString());
}
return defaultValue;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
index 698f0c54dc..60bc83b0ea 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
@@ -77,7 +77,7 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");
String postBody = getPostbody(inputEntity);
- LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", "");
+ LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
httpPost(url, httpPost);
logger.info("SdncNetworkTopologyOperationTask.Send2SdncDirectly end!");
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index 89d0958c75..602894475c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -77,7 +77,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
httpPost.addHeader("Authorization", defaulAuth);
httpPost.addHeader("Content-type", "application/json");
String postBody = getPostbody(inputEntity);
- LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", "");
+ LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
httpPost(url, httpPost);
logger.info("SdncServiceTopologyOperationTask.Send2SdncDirectly end!");
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index 2fbb898f7b..ddc87c7d55 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -1,20 +1,18 @@
<?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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
- <bpmn2:process id="DoCreateE2EServiceInstance" name="DoCreateE2EServiceInstance" isExecutable="true">
+ <bpmn2:process id="DoCreateE2EServiceInstanceV3" name="DoCreateE2EServiceInstanceV3" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
<bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_1qiiycn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w9t6tc</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def dcsi = new DoCreateE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" />
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="CustomE2EGetService" />
<bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService">
<bpmn2:extensionElements>
<camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
@@ -25,7 +23,7 @@ dcsi.preProcessRequest(execution)
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="serviceType" target="GENGS_serviceType" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
@@ -93,67 +91,29 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="CustomE2EPutService" />
<bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_03fabby</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1tkgqu3</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:scriptTask id="ScriptTask_0081lne" name="Prepare Resource Requst For overlay" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1pjr82f</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0ofqw6v</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-execution.setVariable("resourceType", "overlay")
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:scriptTask id="ScriptTask_0wvq4t8" name="Prepare Resource Request for vEPC" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_05gdjox</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15zgrcq</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-execution.setVariable("resourceType", "vEPC")
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_0uwm4l1" name="Call DoCreateVFCNetworkServiceInstance For vEPC" calledElement="DoCreateVFCNetworkServiceInstance">
- <bpmn2:extensionElements>
- <camunda:in source="nsServiceName" target="nsServiceName" />
- <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
- <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
- <camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceId" target="serviceId" />
- <camunda:in source="operationId" target="operationId" />
- <camunda:in source="resourceType" target="resourceType" />
- <camunda:in source="resourceUUID" target="resourceUUID" />
- <camunda:in source="resourceParameters" target="resourceParameters" />
- <camunda:in source="operationType" target="operationType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_15zgrcq</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0k4q7jm</bpmn2:outgoing>
- </bpmn2:callActivity>
<bpmn2:scriptTask id="ScriptTask_1xdjlzm" name="Post Config Service Instance Creation" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vvdkcs</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_092ghvu</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_16nxl6h</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vbznai</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def csi = new DoCreateE2EServiceInstance()
csi.postConfigRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_0ofqw6v" sourceRef="ScriptTask_0081lne" targetRef="CallActivity_09c3ajg" />
- <bpmn2:sequenceFlow id="SequenceFlow_15zgrcq" sourceRef="ScriptTask_0wvq4t8" targetRef="CallActivity_0uwm4l1" />
- <bpmn2:sequenceFlow id="SequenceFlow_1vvdkcs" sourceRef="CallActivity_09c3ajg" targetRef="ScriptTask_1xdjlzm" />
- <bpmn2:sequenceFlow id="SequenceFlow_092ghvu" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" />
<bpmn2:endEvent id="EndEvent_0kbbt94">
- <bpmn2:incoming>SequenceFlow_092ghvu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0vbznai</bpmn2:incoming>
</bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0k4q7jm" sourceRef="CallActivity_0uwm4l1" targetRef="Task_0aidjmp" />
<bpmn2:sequenceFlow id="SequenceFlow_1qctzm0" sourceRef="Task_0uiekmn" targetRef="Task_0raqlqc" />
<bpmn2:scriptTask id="Task_0uiekmn" name="Prepare Resource Oper Status" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_03fabby</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1hbesp9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1qctzm0</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_05gdjox" sourceRef="Task_0raqlqc" targetRef="ScriptTask_0wvq4t8" />
<bpmn2:serviceTask id="Task_0raqlqc" name="Init Resource Oper Status">
<bpmn2:extensionElements>
<camunda:connector>
@@ -174,307 +134,544 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
</camunda:connector>
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_1qctzm0</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_05gdjox</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_10reo7r</bpmn2:outgoing>
+ </bpmn2:serviceTask>
+ <bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
+ <bpmn2:incoming>SequenceFlow_1vprtt9</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_11f2zuu</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_0ua1bbk" sourceRef="Task_0aidjmp" targetRef="Task_03n6y9h" />
- <bpmn2:scriptTask id="Task_0aidjmp" name="Prepare Resource Request For vIMS" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0k4q7jm</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0ua1bbk</bpmn2:outgoing>
+ <bpmn2:sequenceFlow id="SequenceFlow_10reo7r" sourceRef="Task_0raqlqc" targetRef="ScriptTask_1y0los4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_11f2zuu" sourceRef="Task_0io5qby" targetRef="IntermediateThrowEvent_0f2w7aj" />
+ <bpmn2:scriptTask id="ScriptTask_1y0los4" name="Sequence Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_10reo7r</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13d9g1n</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-execution.setVariable("resourceType", "vIMS")
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.sequenceResoure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_13d9g1n" sourceRef="ScriptTask_1y0los4" targetRef="ExclusiveGateway_07rr3wp" />
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?">
+ <bpmn2:incoming>SequenceFlow_1jenxlp</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0q6uy30</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16nxl6h</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="ScriptTask_0y4u2ty" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13c7bhn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1jenxlp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.parseNextResource(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1hgiln0" sourceRef="Task_03n6y9h" targetRef="Task_0io5qby" />
- <bpmn2:callActivity id="Task_03n6y9h" name="Call DoCreateVFCNetworkServiceInstance For vIMS" calledElement="DoCreateVFCNetworkServiceInstance">
+ <bpmn2:sequenceFlow id="SequenceFlow_1jenxlp" sourceRef="ScriptTask_0y4u2ty" targetRef="ExclusiveGateway_0n9y4du" />
+ <bpmn2:scriptTask id="ScriptTask_0l4nkqr" name="Get Current Resource" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0q6uy30</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1qozd66</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0uiygod</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.getCurrentResoure(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed">
+ <bpmn2:incoming>SequenceFlow_13d9g1n</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_18wj44x</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1vprtt9</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="Task_0qlkmvt" name="Prepare resource recipe Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0uiygod</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1u9k0dm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe">
+ <bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.executeResourceRecipe(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to Decompose_Service">
+ <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mlbhmt" name="GoTo StartService">
+ <bpmn2:incoming>SequenceFlow_1gusrvp</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1o01d7d" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xjwb45</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_027owbf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.processDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0biblpc" name="Call Decompose Service" calledElement="DecomposeService">
<bpmn2:extensionElements>
- <camunda:in source="nsServiceName" target="nsServiceName" />
- <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
- <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
- <camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceId" target="serviceId" />
- <camunda:in source="operationId" target="operationId" />
- <camunda:in source="resourceType" target="resourceType" />
- <camunda:in source="resourceUUID" target="resourceUUID" />
- <camunda:in source="resourceParameters" target="resourceParameters" />
- <camunda:in source="operationType" target="operationType" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0ua1bbk</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1hgiln0</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_0qxzgvq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xjwb45</bpmn2:outgoing>
</bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1vo0235" sourceRef="Task_0io5qby" targetRef="Task_0pkhzoj" />
- <bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
- <bpmn2:incoming>SequenceFlow_1hgiln0</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vo0235</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_17i1ors" sourceRef="Task_0pkhzoj" targetRef="Task_0gs55f1" />
- <bpmn2:sequenceFlow id="SequenceFlow_1pjr82f" sourceRef="Task_0gs55f1" targetRef="ScriptTask_0081lne" />
- <bpmn2:scriptTask id="Task_0pkhzoj" name="Prepare Resource Request For underlay" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vo0235</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17i1ors</bpmn2:outgoing>
+ <bpmn2:scriptTask id="ScriptTask_1cllqk3" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_166w91p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qxzgvq</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-execution.setVariable("resourceType", "underlay")
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0tv85pg" name="Decompose_Service">
+ <bpmn2:outgoing>SequenceFlow_166w91p</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_027owbf" sourceRef="ScriptTask_1o01d7d" targetRef="Task_0ush1g4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xjwb45" sourceRef="CallActivity_0biblpc" targetRef="ScriptTask_1o01d7d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qxzgvq" sourceRef="ScriptTask_1cllqk3" targetRef="CallActivity_0biblpc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_166w91p" sourceRef="IntermediateCatchEvent_0tv85pg" targetRef="ScriptTask_1cllqk3" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16okck2" name="GoTo StartPrepareResource">
+ <bpmn2:incoming>SequenceFlow_1tkgqu3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tkgqu3" sourceRef="ScriptTask_0q37vn9" targetRef="IntermediateThrowEvent_16okck2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0jrb3xu" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0f2w7aj" name="GoTo ResourceLoop">
+ <bpmn2:incoming>SequenceFlow_18wj44x</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_11f2zuu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vprtt9" name="yes" sourceRef="ExclusiveGateway_07rr3wp" targetRef="Task_0io5qby">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
+ <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_0uiekmn" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_02bah5m" name="ResourceLoop">
+ <bpmn2:outgoing>SequenceFlow_1qozd66</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16nxl6h" name="yes" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_1xdjlzm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0uiygod" sourceRef="ScriptTask_0l4nkqr" targetRef="Task_0qlkmvt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1u9k0dm" sourceRef="Task_0qlkmvt" targetRef="Task_12ghoph" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13c7bhn" sourceRef="Task_12ghoph" targetRef="ScriptTask_0y4u2ty" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vbznai" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qozd66" sourceRef="IntermediateCatchEvent_02bah5m" targetRef="ScriptTask_0l4nkqr" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1gusrvp" sourceRef="Task_0ush1g4" targetRef="IntermediateThrowEvent_1mlbhmt" />
+ <bpmn2:scriptTask id="Task_0ush1g4" name="Call Homing(To be Done)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_027owbf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gusrvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.doServiceHoming(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:serviceTask id="Task_0gs55f1" name="Call Underlay Create" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
- <bpmn2:incoming>SequenceFlow_17i1ors</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1pjr82f</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:serviceTask id="CallActivity_09c3ajg" name="Call Overlay Create" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
- <bpmn2:incoming>SequenceFlow_0ofqw6v</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vvdkcs</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_03fabby" sourceRef="ScriptTask_0q37vn9" targetRef="Task_0uiekmn" />
</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="DoCreateE2EServiceInstance">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceV3">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
- <dc:Bounds x="34" y="79" width="36" height="36" />
+ <dc:Bounds x="18" y="-207" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="28" y="120" width="50" height="12" />
+ <dc:Bounds x="12" y="-166" width="50" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds x="245" y="57" width="100" height="80" />
+ <dc:Bounds x="126" y="-229" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
- <di:waypoint xsi:type="dc:Point" x="70" y="97" />
- <di:waypoint xsi:type="dc:Point" x="245" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="112.5" y="82" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="626" y="94" />
- <di:waypoint xsi:type="dc:Point" x="971" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="753.5" y="79" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="CallActivity_1md4kyb_di">
- <di:waypoint xsi:type="dc:Point" x="345" y="97" />
- <di:waypoint xsi:type="dc:Point" x="526" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="296" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="390.5" y="82" width="90" height="0" />
+ <dc:Bounds x="357" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="526" y="57" width="100" height="80" />
+ <dc:Bounds x="196" y="57" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
- <dc:Bounds x="972" y="206" width="100" height="80" />
+ <dc:Bounds x="713" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
- <di:waypoint xsi:type="dc:Point" x="1023" y="286" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="336" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1023" y="296" width="0" height="0" />
+ <dc:Bounds x="911" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
- <dc:Bounds x="-155" y="387" width="783" height="195" />
+ <dc:Bounds x="15" y="865" width="783" height="195" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
- <dc:Bounds x="-59" y="464" width="36" height="36" />
+ <dc:Bounds x="111" y="942" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-86" y="505" width="90" height="0" />
+ <dc:Bounds x="84" y="983" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
- <dc:Bounds x="574" y="464" width="36" height="36" />
+ <dc:Bounds x="744" y="942" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="547" y="505" width="90" height="0" />
+ <dc:Bounds x="717" y="983" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
- <dc:Bounds x="239" y="442" width="100" height="80" />
+ <dc:Bounds x="409" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
- <di:waypoint xsi:type="dc:Point" x="339" y="482" />
- <di:waypoint xsi:type="dc:Point" x="407" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="509" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="577" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="328" y="467" width="90" height="0" />
+ <dc:Bounds x="498" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
- <di:waypoint xsi:type="dc:Point" x="-23" y="482" />
- <di:waypoint xsi:type="dc:Point" x="76" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-18" y="467" width="90" height="0" />
+ <dc:Bounds x="152" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
- <dc:Bounds x="971" y="57" width="100" height="80" />
+ <dc:Bounds x="478" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs">
- <di:waypoint xsi:type="dc:Point" x="1021" y="137" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="206" />
+ <di:waypoint xsi:type="dc:Point" x="578" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="991" y="171.5" width="90" height="0" />
+ <dc:Bounds x="616" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
- <dc:Bounds x="972" y="336" width="100" height="80" />
+ <dc:Bounds x="1068" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
- <dc:Bounds x="76" y="442" width="100" height="80" />
+ <dc:Bounds x="246" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
- <di:waypoint xsi:type="dc:Point" x="176" y="482" />
- <di:waypoint xsi:type="dc:Point" x="239" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="409" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="163" y="467" width="90" height="0" />
+ <dc:Bounds x="333" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
- <dc:Bounds x="407" y="442" width="100" height="80" />
+ <dc:Bounds x="577" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
- <di:waypoint xsi:type="dc:Point" x="507" y="482" />
- <di:waypoint xsi:type="dc:Point" x="539" y="482" />
- <di:waypoint xsi:type="dc:Point" x="539" y="482" />
- <di:waypoint xsi:type="dc:Point" x="574" y="482" />
+ <di:waypoint xsi:type="dc:Point" x="677" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="509" y="482" width="90" height="0" />
+ <dc:Bounds x="679" y="960" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0081lne_di" bpmnElement="ScriptTask_0081lne">
- <dc:Bounds x="-410" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm">
+ <dc:Bounds x="1119" y="485" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0wvq4t8_di" bpmnElement="ScriptTask_0wvq4t8">
- <dc:Bounds x="789" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94">
+ <dc:Bounds x="1315" y="507" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1197" y="547" width="90" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_0uwm4l1_di" bpmnElement="CallActivity_0uwm4l1">
- <dc:Bounds x="632" y="819" width="100" height="80" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0">
+ <di:waypoint xsi:type="dc:Point" x="296" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="402" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="304" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn">
+ <dc:Bounds x="196" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm">
- <dc:Bounds x="-741" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc">
+ <dc:Bounds x="402" y="260" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby">
+ <dc:Bounds x="944" y="353" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ofqw6v_di" bpmnElement="SequenceFlow_0ofqw6v">
- <di:waypoint xsi:type="dc:Point" x="-410" y="859" />
- <di:waypoint xsi:type="dc:Point" x="-478" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_10reo7r_di" bpmnElement="SequenceFlow_10reo7r">
+ <di:waypoint xsi:type="dc:Point" x="502" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="583" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-489" y="838" width="90" height="12" />
+ <dc:Bounds x="497.5" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_15zgrcq_di" bpmnElement="SequenceFlow_15zgrcq">
- <di:waypoint xsi:type="dc:Point" x="789" y="859" />
- <di:waypoint xsi:type="dc:Point" x="732" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_11f2zuu_di" bpmnElement="SequenceFlow_11f2zuu">
+ <di:waypoint xsi:type="dc:Point" x="1044" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="715.5" y="838" width="90" height="12" />
+ <dc:Bounds x="1060" y="340.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1vvdkcs_di" bpmnElement="SequenceFlow_1vvdkcs">
- <di:waypoint xsi:type="dc:Point" x="-578" y="859" />
- <di:waypoint xsi:type="dc:Point" x="-641" y="859" />
+ <bpmndi:BPMNShape id="ScriptTask_1y0los4_di" bpmnElement="ScriptTask_1y0los4">
+ <dc:Bounds x="583" y="260" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_13d9g1n_di" bpmnElement="SequenceFlow_13d9g1n">
+ <di:waypoint xsi:type="dc:Point" x="683" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-654.5" y="838" width="90" height="12" />
+ <dc:Bounds x="673" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_092ghvu_di" bpmnElement="SequenceFlow_092ghvu">
- <di:waypoint xsi:type="dc:Point" x="-741" y="859" />
- <di:waypoint xsi:type="dc:Point" x="-787" y="859" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true">
+ <dc:Bounds x="929" y="500" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-809" y="838" width="90" height="12" />
+ <dc:Bounds x="912" y="554" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30">
+ <di:waypoint xsi:type="dc:Point" x="954" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="954" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="565" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="594" y="670" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94">
- <dc:Bounds x="-823" y="841" width="36" height="36" />
+ <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty">
+ <dc:Bounds x="728" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jenxlp_di" bpmnElement="SequenceFlow_1jenxlp">
+ <di:waypoint xsi:type="dc:Point" x="828" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="929" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-941" y="881" width="90" height="12" />
+ <dc:Bounds x="833.5" y="504" width="90" height="12" />
</bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0l4nkqr_di" bpmnElement="ScriptTask_0l4nkqr">
+ <dc:Bounds x="196" y="485" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0k4q7jm_di" bpmnElement="SequenceFlow_0k4q7jm">
- <di:waypoint xsi:type="dc:Point" x="632" y="859" />
- <di:waypoint xsi:type="dc:Point" x="596" y="859" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true">
+ <dc:Bounds x="753" y="275" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="569" y="838" width="90" height="12" />
+ <dc:Bounds x="736" y="329" width="87" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x">
+ <di:waypoint xsi:type="dc:Point" x="803" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="832.3633633633633" y="294" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0">
- <di:waypoint xsi:type="dc:Point" x="1022" y="668" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="704" />
+ <bpmndi:BPMNShape id="ScriptTask_0u88n0f_di" bpmnElement="Task_0qlkmvt">
+ <dc:Bounds x="357" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1y17r20_di" bpmnElement="Task_12ghoph">
+ <dc:Bounds x="551" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11saqvj_di" bpmnElement="IntermediateThrowEvent_0bq4fxs">
+ <dc:Bounds x="1315" y="-207" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1290" y="-167" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1mlbhmt_di" bpmnElement="IntermediateThrowEvent_1mlbhmt">
+ <dc:Bounds x="1315" y="-57" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="680" width="0" height="12" />
+ <dc:Bounds x="1288" y="-16" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1o01d7d_di" bpmnElement="ScriptTask_1o01d7d">
+ <dc:Bounds x="713" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0biblpc_di" bpmnElement="CallActivity_0biblpc">
+ <dc:Bounds x="478" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1cllqk3_di" bpmnElement="ScriptTask_1cllqk3">
+ <dc:Bounds x="196" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0tv85pg_di" bpmnElement="IntermediateCatchEvent_0tv85pg">
+ <dc:Bounds x="26" y="-57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="-21" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_027owbf_di" bpmnElement="SequenceFlow_027owbf">
+ <di:waypoint xsi:type="dc:Point" x="813" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="890" y="-60" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn">
- <dc:Bounds x="972" y="588" width="100" height="80" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0xjwb45_di" bpmnElement="SequenceFlow_0xjwb45">
+ <di:waypoint xsi:type="dc:Point" x="578" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645.5" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qxzgvq_di" bpmnElement="SequenceFlow_0qxzgvq">
+ <di:waypoint xsi:type="dc:Point" x="296" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="387" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn">
+ <di:waypoint xsi:type="dc:Point" x="54" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="-210" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_166w91p_di" bpmnElement="SequenceFlow_166w91p">
+ <di:waypoint xsi:type="dc:Point" x="62" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_16okck2_di" bpmnElement="IntermediateThrowEvent_16okck2">
+ <dc:Bounds x="1315" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1299" y="117" width="71" height="24" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_05gdjox_di" bpmnElement="SequenceFlow_05gdjox">
- <di:waypoint xsi:type="dc:Point" x="1022" y="784" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="859" />
- <di:waypoint xsi:type="dc:Point" x="889" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1tkgqu3_di" bpmnElement="SequenceFlow_1tkgqu3">
+ <di:waypoint xsi:type="dc:Point" x="1168" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="815.5" width="0" height="12" />
+ <dc:Bounds x="1257" y="88" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc">
- <dc:Bounds x="972" y="704" width="100" height="80" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0w9t6tc_di" bpmnElement="SequenceFlow_0w9t6tc">
+ <di:waypoint xsi:type="dc:Point" x="226" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786" y="-195" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jrb3xu_di" bpmnElement="IntermediateCatchEvent_0jrb3xu">
+ <dc:Bounds x="18" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="8" y="115" width="60" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ua1bbk_di" bpmnElement="SequenceFlow_0ua1bbk">
- <di:waypoint xsi:type="dc:Point" x="496" y="859" />
- <di:waypoint xsi:type="dc:Point" x="446" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1i7t9hq_di" bpmnElement="SequenceFlow_1i7t9hq">
+ <di:waypoint xsi:type="dc:Point" x="54" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="838" width="0" height="12" />
+ <dc:Bounds x="125" y="76" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0ue196s_di" bpmnElement="Task_0aidjmp">
- <dc:Bounds x="496" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0f2w7aj_di" bpmnElement="IntermediateThrowEvent_0f2w7aj">
+ <dc:Bounds x="1315" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1299" y="323" width="73" height="24" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1hgiln0_di" bpmnElement="SequenceFlow_1hgiln0">
- <di:waypoint xsi:type="dc:Point" x="346" y="859" />
- <di:waypoint xsi:type="dc:Point" x="191" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1vprtt9_di" bpmnElement="SequenceFlow_1vprtt9">
+ <di:waypoint xsi:type="dc:Point" x="778" y="325" />
+ <di:waypoint xsi:type="dc:Point" x="778" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="944" y="393" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="268.5" y="838" width="0" height="12" />
+ <dc:Bounds x="784" y="353" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1hcdpgq_di" bpmnElement="Task_03n6y9h">
- <dc:Bounds x="346" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
+ <dc:Bounds x="18" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="318" width="82" height="24" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1vo0235_di" bpmnElement="SequenceFlow_1vo0235">
- <di:waypoint xsi:type="dc:Point" x="91" y="859" />
- <di:waypoint xsi:type="dc:Point" x="46" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1hbesp9_di" bpmnElement="SequenceFlow_1hbesp9">
+ <di:waypoint xsi:type="dc:Point" x="54" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="68.5" y="838" width="0" height="12" />
+ <dc:Bounds x="125" y="279" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby">
- <dc:Bounds x="91" y="819" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_02bah5m_di" bpmnElement="IntermediateCatchEvent_02bah5m">
+ <dc:Bounds x="18" y="507" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="543" width="73" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17i1ors_di" bpmnElement="SequenceFlow_17i1ors">
- <di:waypoint xsi:type="dc:Point" x="-54" y="859" />
- <di:waypoint xsi:type="dc:Point" x="-125" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_16nxl6h_di" bpmnElement="SequenceFlow_16nxl6h">
+ <di:waypoint xsi:type="dc:Point" x="979" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1119" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-134.5" y="838" width="90" height="12" />
+ <dc:Bounds x="1040" y="504" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1pjr82f_di" bpmnElement="SequenceFlow_1pjr82f">
- <di:waypoint xsi:type="dc:Point" x="-225" y="859" />
- <di:waypoint xsi:type="dc:Point" x="-310" y="859" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0uiygod_di" bpmnElement="SequenceFlow_0uiygod">
+ <di:waypoint xsi:type="dc:Point" x="296" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-312.5" y="838" width="90" height="12" />
+ <dc:Bounds x="326.5" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0ue4dzp_di" bpmnElement="Task_0pkhzoj">
- <dc:Bounds x="-54" y="819" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1q727pm_di" bpmnElement="Task_0gs55f1">
- <dc:Bounds x="-225" y="819" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1cnnn5b_di" bpmnElement="CallActivity_09c3ajg">
- <dc:Bounds x="-578" y="819" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_03fabby_di" bpmnElement="SequenceFlow_03fabby">
- <di:waypoint xsi:type="dc:Point" x="1022" y="416" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="588" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1u9k0dm_di" bpmnElement="SequenceFlow_1u9k0dm">
+ <di:waypoint xsi:type="dc:Point" x="457" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="551" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="504" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_13c7bhn_di" bpmnElement="SequenceFlow_13c7bhn">
+ <di:waypoint xsi:type="dc:Point" x="651" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="689.5" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vbznai_di" bpmnElement="SequenceFlow_0vbznai">
+ <di:waypoint xsi:type="dc:Point" x="1219" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="496" width="0" height="12" />
+ <dc:Bounds x="1267" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qozd66_di" bpmnElement="SequenceFlow_1qozd66">
+ <di:waypoint xsi:type="dc:Point" x="54" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="525" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="125" y="504" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gusrvp_di" bpmnElement="SequenceFlow_1gusrvp">
+ <di:waypoint xsi:type="dc:Point" x="1157" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1236" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wr11dt_di" bpmnElement="Task_0ush1g4">
+ <dc:Bounds x="1057" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
index 10e49a198b..095948a87c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -1,6 +1,6 @@
<?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="DoCustomDeleteE2EServiceInstance" isExecutable="true">
+ <bpmn:process id="DoCustomDeleteE2EServiceInstanceV3" name="All Resources Deleted" isExecutable="true">
<bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
<bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
</bpmn:startEvent>
@@ -26,7 +26,8 @@ ddsi.preProcessRequest(execution)
<camunda:out source="GENDS_SuccessIndicator" target="GENDS_SuccessIndicator" />
<camunda:out source="WorkflowException" target="WorkflowExcpeton" />
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0vg4q7x</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1ev7z6q</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0oj2anh</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0g6bxqw</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy">
@@ -66,70 +67,25 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" />
<bpmn:sequenceFlow id="SequenceFlow_0g6bxqw" sourceRef="CallActivity_06izbke" targetRef="ScriptTask_01erufg" />
<bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ScriptTask_146jt8v" />
- <bpmn:callActivity id="CallActivity_Del_VFC" name="Call Network Service Delete for vEPC" calledElement="DoDeleteVFCNetworkServiceInstance">
- <bpmn:extensionElements>
- <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
- <camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceInstanceId" target="serviceId" />
- <camunda:in source="operationId" target="operationId" />
- <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
- <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
- <camunda:in source="resourceType" target="resourceType" />
- <camunda:in source="operationType" target="operationType" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1wmjau1</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0qquvgc</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_0qquvgc" sourceRef="CallActivity_Del_VFC" targetRef="ScriptTask_0mdub03" />
- <bpmn:scriptTask id="ScriptTask_0vcz9mj" name="Prepare Resource Delele For vEPC" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1931m8u</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1wmjau1</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-String resourceName = "vEPC"
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1wmjau1" sourceRef="ScriptTask_0vcz9mj" targetRef="CallActivity_Del_VFC" />
- <bpmn:scriptTask id="ScriptTask_0mdub03" name="Post Process VFC Delete" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0qquvgc</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0vg4q7x</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-
-String response = execution.getVariable("vfcDeleteResponse")
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.postProcessVFCDelete(execution, response, "delete")]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_1g0tsto" name="Post Process SDNC Delete" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0uc2beq</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1m7tont</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-
-String response = execution.getVariable("sdncDeleteResponse")
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For Overlay" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0l4w9nr</bpmn:incoming>
+ <bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For WAN" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ubor5z</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dza4q4</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-String resourceName = "overlay"
+String resourceName = execution.getVariable("resourceType")
def ddsi = new DoCustomDeleteE2EServiceInstance()
ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1dza4q4" sourceRef="ScriptTask_0z30dax" targetRef="CallActivity_Del_SDNC_cust" />
- <bpmn:sequenceFlow id="SequenceFlow_0rpu756" sourceRef="CallActivity_Del_SDNC_cust" targetRef="Task_14erap6" />
<bpmn:sequenceFlow id="SequenceFlow_1wnkgpx" sourceRef="Task_0z1x3sg" targetRef="Task_0963dho" />
- <bpmn:sequenceFlow id="SequenceFlow_1931m8u" sourceRef="Task_0963dho" targetRef="ScriptTask_0vcz9mj" />
- <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For vIMS" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1m7tont</bpmn:incoming>
+ <bpmn:scriptTask id="Task_0z1x3sg" name="Prepare Resource Delele For NS" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1x3lehs</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1wnkgpx</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-String resourceName = "vIMS"
+String resourceName = execution.getVariable("resourceType")
def ddsi = new DoCustomDeleteE2EServiceInstance()
ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1m7tont" sourceRef="ScriptTask_1g0tsto" targetRef="Task_0z1x3sg" />
- <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for vIMS" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:callActivity id="Task_0963dho" name="Call Network Service Delete for NS" calledElement="DoDeleteVFCNetworkServiceInstance">
<bpmn:extensionElements>
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
@@ -141,31 +97,15 @@ ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
<camunda:in source="operationType" target="operationType" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1wnkgpx</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1931m8u</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0phwem2</bpmn:outgoing>
</bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_0vg4q7x" sourceRef="ScriptTask_0mdub03" targetRef="CallActivity_06izbke" />
<bpmn:serviceTask id="CallActivity_Del_SDNC_cust" name="Call Custom Delete SDNC Overlay" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
<bpmn:incoming>SequenceFlow_1dza4q4</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0rpu756</bpmn:outgoing>
- </bpmn:serviceTask>
- <bpmn:sequenceFlow id="SequenceFlow_0d9lmlv" sourceRef="Task_14erap6" targetRef="Task_1j1u666" />
- <bpmn:sequenceFlow id="SequenceFlow_1g4djgh" sourceRef="Task_1j1u666" targetRef="Task_0edkv0m" />
- <bpmn:sequenceFlow id="SequenceFlow_0uc2beq" sourceRef="Task_0edkv0m" targetRef="ScriptTask_1g0tsto" />
- <bpmn:scriptTask id="Task_14erap6" name="Prepare Resource Delele For Underlay" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0rpu756</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0d9lmlv</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-String resourceName = "underlay"
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:serviceTask id="Task_1j1u666" name="Call Custom Delete SDNC Underlay" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
- <bpmn:incoming>SequenceFlow_0d9lmlv</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1g4djgh</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1lxqjmp</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_0edkv0m" name="Call Delete SDNC Service Topology" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
- <bpmn:incoming>SequenceFlow_1g4djgh</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0uc2beq</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_1icwpye</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ev7z6q</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:scriptTask id="ScriptTask_146jt8v" name="Prepare Resource Oper Status" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming>
@@ -194,10 +134,9 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</camunda:connector>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1ym9otf</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0l4w9nr</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1j08ko3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_1ym9otf" sourceRef="ScriptTask_146jt8v" targetRef="ServiceTask_00tg69u" />
- <bpmn:sequenceFlow id="SequenceFlow_0l4w9nr" sourceRef="ServiceTask_00tg69u" targetRef="ScriptTask_0z30dax" />
<bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService">
<bpmn:extensionElements>
<camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
@@ -214,9 +153,72 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_188ejvu" sourceRef="CallActivity_076pc2z" targetRef="ScriptTask_1rtnsh8" />
+ <bpmn:scriptTask id="ScriptTask_0o5bglz" name="Sequense Resources" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_03c0zlq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.sequenceResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1j08ko3" sourceRef="ServiceTask_00tg69u" targetRef="ScriptTask_0o5bglz" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource">
+ <bpmn:incoming>SequenceFlow_1htjmkv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ubor5z</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1x3lehs</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_12q6a51" name="Get Current Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_03c0zlq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0s1lswk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1htjmkv</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.getCurrentResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_03c0zlq" sourceRef="ScriptTask_0o5bglz" targetRef="ScriptTask_12q6a51" />
+ <bpmn:sequenceFlow id="SequenceFlow_1htjmkv" sourceRef="ScriptTask_12q6a51" targetRef="ExclusiveGateway_07toixi" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ubor5z" name="SDN-C" sourceRef="ExclusiveGateway_07toixi" targetRef="ScriptTask_0z30dax">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "SDN-C" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "VF-C" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="ScriptTask_0w46sge" name="Parse Next Resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1lxqjmp</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0phwem2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0l5r96s</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCustomDeleteE2EServiceInstance()
+ddsi.parseNextResource(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1lxqjmp" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_0w46sge" />
+ <bpmn:sequenceFlow id="SequenceFlow_0phwem2" sourceRef="Task_0963dho" targetRef="ScriptTask_0w46sge" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted">
+ <bpmn:incoming>SequenceFlow_0l5r96s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0talboa</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0s1lswk</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0l5r96s" sourceRef="ScriptTask_0w46sge" targetRef="ExclusiveGateway_1hgjg3u" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained">
+ <bpmn:incoming>SequenceFlow_0talboa</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1icwpye</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0oj2anh</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1icwpye" name="yes" sourceRef="ExclusiveGateway_16046vb" targetRef="Task_0edkv0m">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1ev7z6q" sourceRef="Task_0edkv0m" targetRef="CallActivity_06izbke" />
+ <bpmn:sequenceFlow id="SequenceFlow_0oj2anh" name="no" sourceRef="ExclusiveGateway_16046vb" targetRef="CallActivity_06izbke">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0talboa" name="yes" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ExclusiveGateway_16046vb">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstance">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCustomDeleteE2EServiceInstanceV3">
<bpmndi:BPMNShape id="StartEvent_0212h2r_di" bpmnElement="StartEvent_0212h2r">
<dc:Bounds x="-612" y="-35" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -227,22 +229,22 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<dc:Bounds x="-519" y="-57" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1uqzt26_di" bpmnElement="EndEvent_1uqzt26">
- <dc:Bounds x="1220" y="1109" width="36" height="36" />
+ <dc:Bounds x="1388" y="855" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1148" y="1150" width="90" height="12" />
+ <dc:Bounds x="1316" y="896" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_06izbke_di" bpmnElement="CallActivity_06izbke">
- <dc:Bounds x="1188" y="779" width="100" height="80" />
+ <dc:Bounds x="1356" y="578" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
<dc:Bounds x="-193" y="-57" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg">
- <dc:Bounds x="1188" y="915" width="100" height="80" />
+ <dc:Bounds x="1356" y="711" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_1u8zt9i_di" bpmnElement="SubProcess_1u8zt9i" isExpanded="true">
- <dc:Bounds x="445" y="320" width="467" height="193" />
+ <dc:Bounds x="292" y="675" width="467" height="193" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0vz7cd9_di" bpmnElement="SequenceFlow_0vz7cd9">
<di:waypoint xsi:type="dc:Point" x="-576" y="-17" />
@@ -259,17 +261,17 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
- <di:waypoint xsi:type="dc:Point" x="1238" y="995" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="1109" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="791" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="855" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1208" y="1046" width="90" height="12" />
+ <dc:Bounds x="1376" y="817" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0g6bxqw_di" bpmnElement="SequenceFlow_0g6bxqw">
- <di:waypoint xsi:type="dc:Point" x="1238" y="859" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="915" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="658" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="711" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1208" y="881" width="90" height="12" />
+ <dc:Bounds x="1376" y="678.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6">
@@ -280,172 +282,214 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt">
- <dc:Bounds x="513" y="387" width="36" height="36" />
+ <dc:Bounds x="360" y="742" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="441" y="428" width="90" height="12" />
+ <dc:Bounds x="288" y="783" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_06utmg4_di" bpmnElement="EndEvent_06utmg4">
- <dc:Bounds x="806" y="387" width="36" height="36" />
+ <dc:Bounds x="653" y="742" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="734" y="428" width="90" height="12" />
+ <dc:Bounds x="581" y="783" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0nha3pr_di" bpmnElement="ScriptTask_0nha3pr">
- <dc:Bounds x="617" y="365" width="100" height="80" />
+ <dc:Bounds x="464" y="720" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1921mo3_di" bpmnElement="SequenceFlow_1921mo3">
- <di:waypoint xsi:type="dc:Point" x="549" y="405" />
- <di:waypoint xsi:type="dc:Point" x="617" y="405" />
+ <di:waypoint xsi:type="dc:Point" x="396" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="760" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="493" y="390" width="90" height="12" />
+ <dc:Bounds x="340" y="745" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_18vlzfo_di" bpmnElement="SequenceFlow_18vlzfo">
- <di:waypoint xsi:type="dc:Point" x="717" y="405" />
- <di:waypoint xsi:type="dc:Point" x="806" y="405" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="760" />
+ <di:waypoint xsi:type="dc:Point" x="653" y="760" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="520" y="745" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax">
+ <dc:Bounds x="470" y="111" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4">
+ <di:waypoint xsi:type="dc:Point" x="570" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="152" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="584" y="130.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx">
+ <di:waypoint xsi:type="dc:Point" x="576" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="688" y="378" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="673" y="390" width="90" height="12" />
+ <dc:Bounds x="587" y="357" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1x56smn_di" bpmnElement="CallActivity_Del_VFC">
- <dc:Bounds x="1188" y="483" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg">
+ <dc:Bounds x="476" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho">
+ <dc:Bounds x="688" y="338" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust">
+ <dc:Bounds x="688" y="112" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
+ <dc:Bounds x="1356" y="233" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0qquvgc_di" bpmnElement="SequenceFlow_0qquvgc">
- <di:waypoint xsi:type="dc:Point" x="1238" y="563" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="642" />
+ <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v">
+ <dc:Bounds x="-26" y="-57" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u">
+ <dc:Bounds x="-26" y="67" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf">
+ <di:waypoint xsi:type="dc:Point" x="24" y="23" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="67" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1208" y="596.5" width="90" height="12" />
+ <dc:Bounds x="-6" y="39" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0vcz9mj_di" bpmnElement="ScriptTask_0vcz9mj">
- <dc:Bounds x="1188" y="338" width="100" height="80" />
+ <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
+ <dc:Bounds x="-357" y="-57" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1wmjau1_di" bpmnElement="SequenceFlow_1wmjau1">
- <di:waypoint xsi:type="dc:Point" x="1238" y="418" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="483" />
+ <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
+ <di:waypoint xsi:type="dc:Point" x="-257" y="-17" />
+ <di:waypoint xsi:type="dc:Point" x="-193" y="-17" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1208" y="444.5" width="90" height="12" />
+ <dc:Bounds x="-225" y="-38" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0mdub03_di" bpmnElement="ScriptTask_0mdub03">
- <dc:Bounds x="1188" y="642" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0o5bglz_di" bpmnElement="ScriptTask_0o5bglz">
+ <dc:Bounds x="-26" y="233" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1g0tsto_di" bpmnElement="ScriptTask_1g0tsto">
- <dc:Bounds x="1188" y="-57" width="100" height="80" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1j08ko3_di" bpmnElement="SequenceFlow_1j08ko3">
+ <di:waypoint xsi:type="dc:Point" x="24" y="147" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="233" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="39" y="184" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07toixi_di" bpmnElement="ExclusiveGateway_07toixi" isMarkerVisible="true">
+ <dc:Bounds x="342.56962025316454" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="332" y="302" width="73" height="24" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0z30dax_di" bpmnElement="ScriptTask_0z30dax">
- <dc:Bounds x="316" y="-57" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_12q6a51_di" bpmnElement="ScriptTask_12q6a51">
+ <dc:Bounds x="159" y="450" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1dza4q4_di" bpmnElement="SequenceFlow_1dza4q4">
- <di:waypoint xsi:type="dc:Point" x="416" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="499" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_03c0zlq_di" bpmnElement="SequenceFlow_03c0zlq">
+ <di:waypoint xsi:type="dc:Point" x="24" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="24" y="494" />
+ <di:waypoint xsi:type="dc:Point" x="159" y="490" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="412.5" y="-38" width="90" height="12" />
+ <dc:Bounds x="39" y="397.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0rpu756_di" bpmnElement="SequenceFlow_0rpu756">
- <di:waypoint xsi:type="dc:Point" x="599" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="679" y="-16" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1htjmkv_di" bpmnElement="SequenceFlow_1htjmkv">
+ <di:waypoint xsi:type="dc:Point" x="209" y="450" />
+ <di:waypoint xsi:type="dc:Point" x="209" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="343" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="594" y="-37.5" width="90" height="12" />
+ <dc:Bounds x="224" y="355.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1wnkgpx_di" bpmnElement="SequenceFlow_1wnkgpx">
- <di:waypoint xsi:type="dc:Point" x="1237" y="134" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="192" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1ubor5z_di" bpmnElement="SequenceFlow_1ubor5z">
+ <di:waypoint xsi:type="dc:Point" x="368" y="248" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="151" />
+ <di:waypoint xsi:type="dc:Point" x="470" y="151" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1237.5" y="142" width="0" height="12" />
+ <dc:Bounds x="366" y="193.5" width="35" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1931m8u_di" bpmnElement="SequenceFlow_1931m8u">
- <di:waypoint xsi:type="dc:Point" x="1237" y="272" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="338" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1x3lehs_di" bpmnElement="SequenceFlow_1x3lehs">
+ <di:waypoint xsi:type="dc:Point" x="368" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="368" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="476" y="378" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1237.5" y="284" width="0" height="12" />
+ <dc:Bounds x="379" y="353" width="27" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_00301ai_di" bpmnElement="Task_0z1x3sg">
- <dc:Bounds x="1188" y="54" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0w46sge_di" bpmnElement="ScriptTask_0w46sge">
+ <dc:Bounds x="865" y="233" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1m7tont_di" bpmnElement="SequenceFlow_1m7tont">
- <di:waypoint xsi:type="dc:Point" x="1238" y="23" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="54" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1lxqjmp_di" bpmnElement="SequenceFlow_1lxqjmp">
+ <di:waypoint xsi:type="dc:Point" x="788" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="152" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1253" y="32.5" width="0" height="12" />
+ <dc:Bounds x="842" y="206.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1mwacgl_di" bpmnElement="Task_0963dho">
- <dc:Bounds x="1188" y="192" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0vg4q7x_di" bpmnElement="SequenceFlow_0vg4q7x">
- <di:waypoint xsi:type="dc:Point" x="1238" y="722" />
- <di:waypoint xsi:type="dc:Point" x="1238" y="779" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0phwem2_di" bpmnElement="SequenceFlow_0phwem2">
+ <di:waypoint xsi:type="dc:Point" x="788" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="378" />
+ <di:waypoint xsi:type="dc:Point" x="827" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="865" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1253" y="744.5" width="0" height="12" />
+ <dc:Bounds x="842" y="319.5" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0v9q75y_di" bpmnElement="CallActivity_Del_SDNC_cust">
- <dc:Bounds x="499" y="-57" width="100" height="80" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_1hgjg3u_di" bpmnElement="ExclusiveGateway_1hgjg3u" isMarkerVisible="true">
+ <dc:Bounds x="1040.9252217997464" y="248" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1029" y="302" width="74" height="24" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0d9lmlv_di" bpmnElement="SequenceFlow_0d9lmlv">
- <di:waypoint xsi:type="dc:Point" x="779" y="-16" />
- <di:waypoint xsi:type="dc:Point" x="855" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0l5r96s_di" bpmnElement="SequenceFlow_0l5r96s">
+ <di:waypoint xsi:type="dc:Point" x="965" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1041" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="772" y="-37.5" width="90" height="12" />
+ <dc:Bounds x="1003" y="252" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1g4djgh_di" bpmnElement="SequenceFlow_1g4djgh">
- <di:waypoint xsi:type="dc:Point" x="955" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="-17" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_16046vb_di" bpmnElement="ExclusiveGateway_16046vb" isMarkerVisible="true">
+ <dc:Bounds x="1203.8174904942966" y="248.28010139416983" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1187" y="302" width="83" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1icwpye_di" bpmnElement="SequenceFlow_1icwpye">
+ <di:waypoint xsi:type="dc:Point" x="1254" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="943" y="-38" width="90" height="12" />
+ <dc:Bounds x="1297" y="252" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0uc2beq_di" bpmnElement="SequenceFlow_0uc2beq">
- <di:waypoint xsi:type="dc:Point" x="1121" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="1188" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1ev7z6q_di" bpmnElement="SequenceFlow_1ev7z6q">
+ <di:waypoint xsi:type="dc:Point" x="1406" y="313" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="448" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="448" />
+ <di:waypoint xsi:type="dc:Point" x="1406" y="578" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1109.5" y="-38" width="90" height="12" />
+ <dc:Bounds x="1421" y="442" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1e5z0wu_di" bpmnElement="Task_14erap6">
- <dc:Bounds x="679" y="-56" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0f0965f_di" bpmnElement="Task_1j1u666">
- <dc:Bounds x="855" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
- <dc:Bounds x="1021" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_146jt8v_di" bpmnElement="ScriptTask_146jt8v">
- <dc:Bounds x="-26" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_00tg69u_di" bpmnElement="ServiceTask_00tg69u">
- <dc:Bounds x="144" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1ym9otf_di" bpmnElement="SequenceFlow_1ym9otf">
- <di:waypoint xsi:type="dc:Point" x="74" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="144" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0oj2anh_di" bpmnElement="SequenceFlow_0oj2anh">
+ <di:waypoint xsi:type="dc:Point" x="1229" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1229" y="618" />
+ <di:waypoint xsi:type="dc:Point" x="1356" y="618" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="64" y="-38" width="90" height="12" />
+ <dc:Bounds x="1238" y="452.30710172744716" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0l4w9nr_di" bpmnElement="SequenceFlow_0l4w9nr">
- <di:waypoint xsi:type="dc:Point" x="244" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="316" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0talboa_di" bpmnElement="SequenceFlow_0talboa">
+ <di:waypoint xsi:type="dc:Point" x="1091" y="273" />
+ <di:waypoint xsi:type="dc:Point" x="1204" y="273" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="235" y="-38" width="90" height="12" />
+ <dc:Bounds x="1138" y="252" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
- <dc:Bounds x="-357" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
- <di:waypoint xsi:type="dc:Point" x="-257" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-193" y="-17" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0s1lswk_di" bpmnElement="SequenceFlow_0s1lswk">
+ <di:waypoint xsi:type="dc:Point" x="1066" y="298" />
+ <di:waypoint xsi:type="dc:Point" x="1066" y="490" />
+ <di:waypoint xsi:type="dc:Point" x="259" y="490" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-225" y="-38" width="0" height="12" />
+ <dc:Bounds x="1075" y="388" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
index 3b97cad585..7a494db998 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/test/groovy/org/openecomp/mso/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
@@ -109,6 +109,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
assertTrue(map.containsKey("subscriberInfo"))
verify(mex).setVariable("brgWanMacAddress", "brgmac")
+ verify(mex).setVariable("customerLocation", ["customerLatitude":"32.897480", "customerLongitude":"-97.040443", "customerName":"some_company"])
assertTrue(map.containsKey("serviceInputParams"))
assertTrue(map.containsKey(Prefix+"requestInfo"))
@@ -141,6 +142,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
def req = request
.replace('"source"', '"sourceXXX"')
.replace('"BRG_WAN_MAC_Address"', '"BRG_WAN_MAC_AddressXXX"')
+ .replace('"Customer_Location"', '"Customer_LocationXXX"')
when(mex.getVariable("bpmnRequest")).thenReturn(req)
when(mex.getVariable("serviceInstanceId")).thenReturn(null)
@@ -164,6 +166,7 @@ class CreateVcpeResCustServiceTest extends GroovyTestBase {
assertTrue(map.containsKey("subscriberInfo"))
assertEquals("", map.get("brgWanMacAddress"))
+ assertEquals("", map.get("customerLocation"))
assertTrue(map.containsKey("serviceInputParams"))
assertTrue(map.containsKey(Prefix+"requestInfo"))
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateGenericALaCarteServiceInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateGenericALaCarteServiceInstanceTest.java
index 571db76399..549664588e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateGenericALaCarteServiceInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateGenericALaCarteServiceInstanceTest.java
@@ -113,7 +113,7 @@ public class CreateGenericALaCarteServiceInstanceTest extends WorkflowTest {
// Success Scenario
private Map<String, String> setupVariables() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("isDebugLogEnabled", "true");
variables.put("bpmnRequest", getRequest());
variables.put("mso-request-id", "RaaCSIRequestId-1");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateNetworkInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateNetworkInstanceTest.java
index c259310717..b95ebb5fc7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateNetworkInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateNetworkInstanceTest.java
@@ -430,7 +430,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// Success Scenario
private Map<String, String> setupVariables1() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("requestId", "testRequestId");
@@ -455,7 +455,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// Success Scenario 2
private Map<String, String> setupVariables2() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
@@ -479,7 +479,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// Active Scenario
private Map<String, String> setupVariablesActive() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
@@ -503,7 +503,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// Missing Name Scenario
private Map<String, String> setupVariablesMissingName() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
//variables.put("bpmnRequest", getCreateNetworkRequestMissingName());
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
@@ -524,7 +524,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// SDNC Rollback Scenario
private Map<String, String> setupVariablesSDNCRollback() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("serviceInstanceId", "f70e927b-6087-4974-9ef8-c5e4d5847ca4");
@@ -609,7 +609,7 @@ public class CreateNetworkInstanceTest extends WorkflowTest {
// VID json input
private Map<String, String> setupVariablesVID1() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("bpmnRequest", getCreateNetworkRequestVID1());
variables.put("mso-request-id", "testRequestId");
//variables.put("msoRequestId", "testRequestId");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
index 75858996bc..a28e95ad0d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
@@ -175,7 +175,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
//variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
@@ -263,7 +263,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVIDWVolumeAttach() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java
index 4496ab0731..23999c99ad 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleVolumeInfraV1Test.java
@@ -88,7 +88,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -138,7 +138,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -182,7 +182,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -229,7 +229,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -271,7 +271,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request_noreqparm.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -311,7 +311,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
//testVariables.put("vnfId", "TEST-VNF-ID-0123");
@@ -349,7 +349,7 @@ public class CreateVfModuleVolumeInfraV1Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/CreateVfModuleVolumeInfraV1/createVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
//testVariables.put("vnfId", "TEST-VNF-ID-0123");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java
index 803977bbb3..d5f94965fe 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVnfInfraTest.java
@@ -87,7 +87,7 @@ public class CreateVnfInfraTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
TestAsyncResponse asyncResponse = invokeAsyncProcess("CreateVnfInfra",
"v1", businessKey, createVnfInfraRequest, variables);
@@ -124,7 +124,7 @@ public class CreateVnfInfraTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, null, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
@@ -142,7 +142,7 @@ public class CreateVnfInfraTest extends WorkflowTest {
MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
@@ -174,7 +174,7 @@ public class CreateVnfInfraTest extends WorkflowTest {
MockPutGenericVnf();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CreateVnfInfra", variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteGenericALaCarteServiceInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteGenericALaCarteServiceInstanceTest.java
index 02e236c914..aa05953493 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteGenericALaCarteServiceInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteGenericALaCarteServiceInstanceTest.java
@@ -95,7 +95,7 @@ public class DeleteGenericALaCarteServiceInstanceTest extends WorkflowTest {
// Success Scenario
private Map<String, String> setupVariables() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("isDebugLogEnabled", "true");
variables.put("bpmnRequest", getRequest());
variables.put("mso-request-id", "RaaTestRequestId-1");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteNetworkInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteNetworkInstanceTest.java
index ca04d6fe46..4317a57405 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteNetworkInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteNetworkInstanceTest.java
@@ -87,7 +87,7 @@ public class DeleteNetworkInstanceTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
MockGetCloudRegion("RDM2WAGPLCP", 200, "DeleteNetworkV2/cloudRegion30_AAIResponse_Success.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("mso-request-id", "testRequestId");
variables.put("requestId", "testRequestId");
variables.put("isBaseVfModule", "true");
@@ -160,7 +160,7 @@ public class DeleteNetworkInstanceTest extends WorkflowTest {
String networkModelInfo = " {\"modelName\": \"modelName\", " + '\n' +
" \"networkType\": \"modelName\" }";
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("requestId", "testRequestId");
@@ -236,7 +236,7 @@ public class DeleteNetworkInstanceTest extends WorkflowTest {
String networkModelInfo = " {\"modelCustomizationId\": \"uuid-nrc-001-1234\", " + '\n' +
" \"modelInvariantId\": \"was-ist-das-001-1234\" }";
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("requestId", "testRequestId");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
index e89c64e6df..4c478e6143 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleInfraTest.java
@@ -552,7 +552,7 @@ public class DeleteVfModuleInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
@@ -576,4 +576,4 @@ public class DeleteVfModuleInfraTest extends WorkflowTest {
}
-}
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java
index c343c9791e..84050c40e5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVfModuleVolumeInfraV1Test.java
@@ -65,7 +65,7 @@ public class DeleteVfModuleVolumeInfraV1Test extends WorkflowTest {
String deleteVfModuleVolRequest =
FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("volumeGroupId", "78987");
testVariables.put("serviceInstanceId", "test-service-instance-id-0123");
@@ -105,7 +105,7 @@ public class DeleteVfModuleVolumeInfraV1Test extends WorkflowTest {
String deleteVfModuleVolRequest =
FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("volumeGroupId", "78987");
@@ -145,7 +145,7 @@ public class DeleteVfModuleVolumeInfraV1Test extends WorkflowTest {
String deleteVfModuleVolRequest =
FileUtil.readResourceFile("__files/DeleteVfModuleVolumeInfraV1/deleteVfModuleVolume_VID_request_st.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("volumeGroupId", "78987");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java
index 29e278cd39..89bf141247 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DeleteVnfInfraTest.java
@@ -79,7 +79,7 @@ public class DeleteVnfInfraTest extends WorkflowTest {
MockDeleteGenericVnf();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -109,7 +109,7 @@ public class DeleteVnfInfraTest extends WorkflowTest {
MockDeleteGenericVnf();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, deleteVnfInfraRequestCascadeDelete, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -139,7 +139,7 @@ public class DeleteVnfInfraTest extends WorkflowTest {
MockDeleteGenericVnf_404();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
@@ -173,7 +173,7 @@ public class DeleteVnfInfraTest extends WorkflowTest {
MockDeleteGenericVnf();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
setVariables(variables, deleteVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "DeleteVnfInfra", variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateSIRollbackTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateSIRollbackTest.java
index 852c8f922f..16433caa4c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateSIRollbackTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateSIRollbackTest.java
@@ -84,7 +84,7 @@ public class DoCreateSIRollbackTest extends WorkflowTest {
mockUpdateRequestDB(200, "DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setupVariables(variables);
invokeSubProcess("DoCreateServiceInstanceRollback", businessKey, variables);
injectSDNCCallbacks(callbacks, "deactivate");
@@ -196,4 +196,4 @@ public class DoCreateSIRollbackTest extends WorkflowTest {
variables.put("rollbackData",rollbackData);
}
-}
+}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateServiceInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateServiceInstanceTest.java
index 5f05364289..f6c5d904bd 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateServiceInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateServiceInstanceTest.java
@@ -90,7 +90,7 @@ public class DoCreateServiceInstanceTest extends WorkflowTest {
mockUpdateRequestDB(200, "DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setupVariables(variables);
invokeSubProcess("DoCreateServiceInstance", businessKey, variables);
injectSDNCCallbacks(callbacks, "assign");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
index 1d0cb0cd10..25787c79b6 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleRollbackTest.java
@@ -105,7 +105,7 @@ public class DoCreateVfModuleRollbackTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
RollbackData rollbackData = new RollbackData();
rollbackData.put("VFMODULE", "source", "PORTAL");
rollbackData.put("VFMODULE", "vnfid", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
index 84e9ad14ed..d62c7598cb 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleTest.java
@@ -230,7 +230,7 @@ public class DoCreateVfModuleTest extends WorkflowTest {
private Map<String, Object> setupVariablesSunnyDayBuildingBlocks() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV2Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV2Test.java
index f5c8ab6ee8..e9082d9d65 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV2Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVfModuleVolumeV2Test.java
@@ -67,7 +67,7 @@ public class DoCreateVfModuleVolumeV2Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
testVariables.put("vnfId", "TEST-VNF-ID-0123");
testVariables.put("lcpCloudRegionId", "AAIAIC25");
@@ -100,7 +100,7 @@ public class DoCreateVfModuleVolumeV2Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("DCVFMODVOLV2_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
testVariables.put("vnf-id", "TEST-VNF-ID-0123");
testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
@@ -139,7 +139,7 @@ public class DoCreateVfModuleVolumeV2Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("DCVFMODVOLV2_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
testVariables.put("vnf-id", "TEST-VNF-ID-0123");
testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
@@ -176,7 +176,7 @@ public class DoCreateVfModuleVolumeV2Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeRequest.xml");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("DCVFMODVOLV2_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
testVariables.put("vnf-id", "TEST-VNF-ID-0123");
testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
@@ -217,7 +217,7 @@ public class DoCreateVfModuleVolumeV2Test extends WorkflowTest {
String businessKey = UUID.randomUUID().toString();
String createVfModuleVolRequest = FileUtil.readResourceFile("__files/DoCreateVfModuleVolumeV1/CreateVfModuleVolumeNoRollbackRequest.xml");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("DCVFMODVOLV2_volumeGroupId", "TEST-VOLUME-VOLUME-GROUP-ID-0123");
testVariables.put("vnf-id", "TEST-VNF-ID-0123");
testVariables.put("volume-group-id", "TEST-VOLUME-GROUP-ID-0123");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesRollbackTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesRollbackTest.java
index 6c36f12c82..fb2160d970 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesRollbackTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesRollbackTest.java
@@ -145,7 +145,7 @@ public class DoCreateVnfAndModulesRollbackTest extends WorkflowTest {
MockDeleteGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721", "0000021");
MockDeleteVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73", "0000073", 200);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
RollbackData rollbackData = new RollbackData();
rollbackData.put("VFMODULE_BASE", "source", "PORTAL");
@@ -240,7 +240,7 @@ public class DoCreateVnfAndModulesRollbackTest extends WorkflowTest {
MockDoDeleteVfModule_SDNCSuccess();
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
RollbackData rollbackData = new RollbackData();
rollbackData.put("VNF", "vnfId", "testVnfId123");
@@ -327,7 +327,7 @@ public class DoCreateVnfAndModulesRollbackTest extends WorkflowTest {
MockDeleteGenericVnf("a27ce5a9-29c4-4c22-a017-6615ac73c721", "0000021");
MockDeleteVfModuleId("", "", "", 200);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
RollbackData rollbackData = new RollbackData();
rollbackData.put("VFMODULE_BASE", "source", "PORTAL");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesTest.java
index b2afc875b9..c8f97cac04 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfAndModulesTest.java
@@ -114,7 +114,7 @@ public class DoCreateVnfAndModulesTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "", "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
invokeSubProcess("DoCreateVnfAndModules", businessKey, variables);
@@ -168,7 +168,7 @@ public class DoCreateVnfAndModulesTest extends WorkflowTest {
mockSDNCAdapter("VfModularity/StandardSDNCSynchResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesAddonSuccess(variables, "", "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
invokeSubProcess("DoCreateVnfAndModules", businessKey, variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java
index bbdc285498..90d562e101 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoCreateVnfTest.java
@@ -74,7 +74,7 @@ public class DoCreateVnfTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, createVnfInfraRequest, "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
invokeSubProcess("DoCreateVnf", businessKey, variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteServiceInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteServiceInstanceTest.java
index e2850b6b4f..37814999ba 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteServiceInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteServiceInstanceTest.java
@@ -84,7 +84,7 @@ public class DoDeleteServiceInstanceTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setupVariables(variables);
invokeSubProcess("DoDeleteServiceInstance", businessKey, variables);
injectSDNCCallbacks(callbacks, "deactivate");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleFromVnfTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleFromVnfTest.java
index c0d5539a21..13b2f5432d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleFromVnfTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleFromVnfTest.java
@@ -113,7 +113,7 @@ public class DoDeleteVfModuleFromVnfTest extends WorkflowTest {
MockAAIDeleteVfModule();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("msoRequestId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
index c741dfd2ed..578fda3910 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleTest.java
@@ -128,7 +128,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -173,7 +173,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("requestId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -263,7 +263,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -334,7 +334,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -405,7 +405,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
@@ -475,7 +475,7 @@ public class DoDeleteVfModuleTest extends WorkflowTest {
MockPatchVfModuleId("a27ce5a9-29c4-4c22-a017-6615ac73c721", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
variables.put("mso-request-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
variables.put("mso-service-instance-id", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleVolumeV2Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleVolumeV2Test.java
index 454c5302fc..165debe7f1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleVolumeV2Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVfModuleVolumeV2Test.java
@@ -64,7 +64,7 @@ public class DoDeleteVfModuleVolumeV2Test extends WorkflowTest {
MockGetVolumeGroupById("AAIAIC25", "78987", "VfModularity/VolumeGroup.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("mso-request-id", "TEST-REQUEST-ID-0123");
testVariables.put("msoRequestId", "TEST-REQUEST-ID-0123");
testVariables.put("isDebugLogEnabled", "true");
@@ -102,7 +102,7 @@ public class DoDeleteVfModuleVolumeV2Test extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("mso-request-id", "TEST-REQUEST-ID-0123");
testVariables.put("msoRequestId", "TEST-REQUEST-ID-0123");
testVariables.put("isDebugLogEnabled", "true");
@@ -138,7 +138,7 @@ public class DoDeleteVfModuleVolumeV2Test extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("mso-request-id", "TEST-REQUEST-ID-0123");
testVariables.put("msoRequestId", "TEST-REQUEST-ID-0123");
testVariables.put("isDebugLogEnabled", "true");
@@ -174,7 +174,7 @@ public class DoDeleteVfModuleVolumeV2Test extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("mso-request-id", "TEST-REQUEST-ID-0123");
testVariables.put("msoRequestId", "TEST-REQUEST-ID-0123");
testVariables.put("isDebugLogEnabled", "true");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfAndModulesTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfAndModulesTest.java
index de2fc86dbc..a9dde90327 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfAndModulesTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfAndModulesTest.java
@@ -77,7 +77,7 @@ public class DoDeleteVnfAndModulesTest extends WorkflowTest {
mockSDNCAdapter(200);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesVnfOnly(variables);
invokeSubProcess("DoDeleteVnfAndModules", businessKey, variables);
@@ -142,7 +142,7 @@ public class DoDeleteVnfAndModulesTest extends WorkflowTest {
MockAAIDeleteVfModule();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesVnfAndModules(variables);
invokeSubProcess("DoDeleteVnfAndModules", businessKey, variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java
index 086ac099e8..8caa9f22a2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoDeleteVnfTest.java
@@ -54,7 +54,7 @@ public class DoDeleteVnfTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("DoDeleteVnf", businessKey, variables);
// Disabled until SDNC support is there
@@ -81,7 +81,7 @@ public class DoDeleteVnfTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("DoDeleteVnf", businessKey, variables);
@@ -110,7 +110,7 @@ public class DoDeleteVnfTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariables(variables);
invokeSubProcess("DoDeleteVnf", businessKey, variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
index a626fde481..9fa93235b7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVfModuleTest.java
@@ -100,7 +100,7 @@ public class DoUpdateVfModuleTest extends WorkflowTest {
MockGetGenericVnfByIdWithPriority("skask", "supercool", 200, "VfModularity/VfModule-supercool.xml", 1);
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "DEV-VF-0011");
variables.put("isDebugLogEnabled","true");
variables.put("DoUpdateVfModuleRequest", doUpdateVfModuleRequest);
@@ -146,7 +146,7 @@ public class DoUpdateVfModuleTest extends WorkflowTest {
MockVNFAdapterRestVfModule();
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", "DEV-VF-0011");
variables.put("isDebugLogEnabled","true");
variables.put("msoRequestId", "DEV-VF-0011");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVnfAndModulesTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVnfAndModulesTest.java
index 9f19b355ae..4def56cf6a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVnfAndModulesTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/DoUpdateVnfAndModulesTest.java
@@ -104,7 +104,7 @@ public class DoUpdateVnfAndModulesTest extends WorkflowTest {
mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "", "testRequestId123", "MIS%2F1604%2F0026%2FSW_INTERNET");
invokeSubProcess("DoUpdateVnfAndModules", businessKey, variables);
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/ReplaceVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/ReplaceVnfInfraTest.java
index d3d1b5b7f4..64852dfb5f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/ReplaceVnfInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/ReplaceVnfInfraTest.java
@@ -210,7 +210,7 @@ public class ReplaceVnfInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceTest.java
index 7aca55d502..5b5e4e59d3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateNetworkInstanceTest.java
@@ -291,7 +291,7 @@ public class UpdateNetworkInstanceTest extends WorkflowTest {
// Success Scenario
private Map<String, String> setupVariablesVID1() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("bpmnRequest", getCreateNetworkRequest1());
variables.put("mso-request-id", "testRequestId");
variables.put("requestId", "testRequestId");
@@ -378,7 +378,7 @@ public class UpdateNetworkInstanceTest extends WorkflowTest {
// Success Scenario
private Map<String, String> setupVariablesVIPER1() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("testMessageId", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("msoRequestId", "testRequestId");
variables.put("requestId", "testRequestId");
@@ -402,7 +402,7 @@ public class UpdateNetworkInstanceTest extends WorkflowTest {
// Missing Name Scenario
private Map<String, String> setupVariablesMissingNetworkId() {
- Map<String, String> variables = new HashMap<String, String>();
+ Map<String, String> variables = new HashMap<>();
variables.put("mso-request-id", "88f65519-9a38-4c4b-8445-9eb4a5a5af56");
variables.put("bpmnRequest", getCreateNetworkRequestNetworkId());
variables.put("requestId", "testRequestId");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
index 04189a30b2..37c548abf7 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraTest.java
@@ -118,7 +118,7 @@ public class UpdateVfModuleInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraV2Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraV2Test.java
index 6f3ce69a07..65a514c804 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraV2Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleInfraV2Test.java
@@ -98,7 +98,7 @@ public class UpdateVfModuleInfraV2Test extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("requestId", "testRequestId");
variables.put("isBaseVfModule", false);
variables.put("isDebugLogEnabled", "true");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java
index ab72118e36..b24eb56058 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVfModuleVolumeInfraV1Test.java
@@ -76,7 +76,7 @@ public class UpdateVfModuleVolumeInfraV1Test extends WorkflowTest {
String updaetVfModuleVolRequest =
FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("volumeGroupId", "78987");
@@ -122,7 +122,7 @@ public class UpdateVfModuleVolumeInfraV1Test extends WorkflowTest {
String updaetVfModuleVolRequest =
FileUtil.readResourceFile("__files/UpdateVfModuleVolumeInfraV1/updateVfModuleVolume_VID_request_2.json");
- Map<String, Object> testVariables = new HashMap<String, Object>();
+ Map<String, Object> testVariables = new HashMap<>();
testVariables.put("requestId", "TEST-REQUEST-ID-0123");
testVariables.put("serviceInstanceId", "test-service-instance-id");
testVariables.put("volumeGroupId", "78987");
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVnfInfraTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVnfInfraTest.java
index 597628590e..391fc2308b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVnfInfraTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/UpdateVnfInfraTest.java
@@ -152,7 +152,7 @@ public class UpdateVnfInfraTest extends WorkflowTest {
// Active Scenario
private Map<String, Object> setupVariablesSunnyDayVID() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
//try {
// variables.put("bpmnRequest", FileUtil.readResourceFile("__files/CreateVfModule_VID_request.json"));
//}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
index 0af43a2c42..1b3bfa8c76 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/CreateVcpeResCustServiceTest.java
@@ -134,9 +134,9 @@ public class CreateVcpeResCustServiceTest extends AbstractTestBase {
assertEquals("true", BPMNUtil.getVariable(processEngineRule, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
assertEquals("200", BPMNUtil.getVariable(processEngineRule, PROCNAME, VAR_RESP_CODE));
assertEquals(null, workflowException);
- assertTrue(completionReq.indexOf("request-id>testRequestId<") >= 0);
- assertTrue(completionReq.indexOf("action>CREATE<") >= 0);
- assertTrue(completionReq.indexOf("source>VID<") >= 0);
+ assertTrue(completionReq.contains("request-id>testRequestId<"));
+ assertTrue(completionReq.contains("action>CREATE<"));
+ assertTrue(completionReq.contains("source>VID<"));
assertEquals("1", BPMNUtil.getVariable(processEngineRule, PROCNAME, Prefix+"VnfsCreatedCount"));
}
@@ -200,9 +200,9 @@ public class CreateVcpeResCustServiceTest extends AbstractTestBase {
assertEquals("true", BPMNUtil.getVariable(processEngineRule, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
assertEquals("200", BPMNUtil.getVariable(processEngineRule, PROCNAME, VAR_RESP_CODE));
assertEquals(null, workflowException);
- assertTrue(completionReq.indexOf("request-id>testRequestId<") >= 0);
- assertTrue(completionReq.indexOf("action>CREATE<") >= 0);
- assertTrue(completionReq.indexOf("source>VID<") >= 0);
+ assertTrue(completionReq.contains("request-id>testRequestId<"));
+ assertTrue(completionReq.contains("action>CREATE<"));
+ assertTrue(completionReq.contains("source>VID<"));
assertEquals("0", BPMNUtil.getVariable(processEngineRule, PROCNAME, Prefix+"VnfsCreatedCount"));
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DeleteVcpeResCustServiceTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DeleteVcpeResCustServiceTest.java
index 88b6464de0..d026b7a949 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DeleteVcpeResCustServiceTest.java
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/vcpe/DeleteVcpeResCustServiceTest.java
@@ -162,9 +162,9 @@ public class DeleteVcpeResCustServiceTest extends AbstractTestBase {
assertEquals("true", BPMNUtil.getVariable(processEngineRule, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
assertEquals("200", BPMNUtil.getVariable(processEngineRule, PROCNAME, VAR_RESP_CODE));
assertEquals(null, workflowException);
- assertTrue(completionReq.indexOf("<request-id>testRequestId<") >= 0);
- assertTrue(completionReq.indexOf("<action>DELETE<") >= 0);
- assertTrue(completionReq.indexOf("<source>VID<") >= 0);
+ assertTrue(completionReq.contains("<request-id>testRequestId<"));
+ assertTrue(completionReq.contains("<action>DELETE<"));
+ assertTrue(completionReq.contains("<source>VID<"));
assertEquals("2", BPMNUtil.getVariable(processEngineRule, PROCNAME, Prefix+"vnfsDeletedCount"));
@@ -223,9 +223,9 @@ public class DeleteVcpeResCustServiceTest extends AbstractTestBase {
assertEquals("true", BPMNUtil.getVariable(processEngineRule, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
assertEquals("200", BPMNUtil.getVariable(processEngineRule, PROCNAME, VAR_RESP_CODE));
assertEquals(null, workflowException);
- assertTrue(completionReq.indexOf("<request-id>testRequestId<") >= 0);
- assertTrue(completionReq.indexOf("<action>DELETE<") >= 0);
- assertTrue(completionReq.indexOf("<source>VID<") >= 0);
+ assertTrue(completionReq.contains("<request-id>testRequestId<"));
+ assertTrue(completionReq.contains("<action>DELETE<"));
+ assertTrue(completionReq.contains("<source>VID<"));
assertEquals("0", BPMNUtil.getVariable(processEngineRule, PROCNAME, Prefix+"vnfsDeletedCount"));
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
index a0168bd96a..3e05ba0f9d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/request.json
@@ -32,12 +32,19 @@
"aLaCarte":"false",
"userParams":
[
- {
- "name":"BRG_WAN_MAC_Address",
- "value":"brgmac"
- }
- ]
+ {
+ "name":"BRG_WAN_MAC_Address",
+ "value":"brgmac"
+ },
+ {
+ "name": "Customer_Location",
+ "value": {
+ "customerLatitude": "32.897480",
+ "customerLongitude": "-97.040443",
+ "customerName": "some_company"
+ }
+ }
+ ]
}
-
}
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
index 17c6d15fe7..cf02444705 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSIName.json
@@ -29,14 +29,21 @@
{
"subscriptionServiceType":"123456789",
"aLaCarte":"false",
- "userParams":
- [
- {
- "name":"BRG_WAN_MAC_Address",
- "value":"brgmac"
- }
- ]
+ "userParams":
+ [
+ {
+ "name":"BRG_WAN_MAC_Address",
+ "value":"brgmac"
+ },
+ {
+ "name": "Customer_Location",
+ "value": {
+ "customerLatitude": "32.897480",
+ "customerLongitude": "-97.040443",
+ "customerName": "some_company"
+ }
+ }
+ ]
}
-
}
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
index 8583e66d33..39be40aedd 100644
--- a/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
+++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestNoSINameNoRollback.json
@@ -29,14 +29,21 @@
{
"subscriptionServiceType":"123456789",
"aLaCarte":"false",
- "userParams":
- [
- {
- "name":"BRG_WAN_MAC_Address",
- "value":"brgmac"
- }
- ]
+ "userParams":
+ [
+ {
+ "name":"BRG_WAN_MAC_Address",
+ "value":"brgmac"
+ },
+ {
+ "name": "Customer_Location",
+ "value": {
+ "customerLatitude": "32.897480",
+ "customerLongitude": "-97.040443",
+ "customerName": "some_company"
+ }
+ }
+ ]
}
-
}
}
diff --git a/bpmn/MSORESTClient/pom.xml b/bpmn/MSORESTClient/pom.xml
index c17015c003..5d89e29025 100644
--- a/bpmn/MSORESTClient/pom.xml
+++ b/bpmn/MSORESTClient/pom.xml
@@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSORESTClient</artifactId>
<packaging>jar</packaging>
@@ -31,7 +31,7 @@
</dependency>
<dependency>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
index 6504615f7a..3170e49371 100644
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/RESTClient.java
@@ -242,16 +242,16 @@ public class RESTClient {
/**
* Creates a RESTClient with the RESTConfig object.
*
- * @param RESTConfig config to use for sending request
+ * @param restConfig config to use for sending request
*
* @throws RESTException if unable to create a RESTClient
*/
- public RESTClient(RESTConfig cfg) throws RESTException {
- this.headers = new LinkedHashMap<String, List<String>>();
- this.parameters = new LinkedHashMap<String, List<String>>();
- this.URL = cfg.getURL();
- this.proxyHost = cfg.getProxyHost();
- this.proxyPort = cfg.getProxyPort();
+ public RESTClient(RESTConfig restConfig) throws RESTException {
+ this.headers = new LinkedHashMap<>();
+ this.parameters = new LinkedHashMap<>();
+ this.URL = restConfig.getURL();
+ this.proxyHost = restConfig.getProxyHost();
+ this.proxyPort = restConfig.getProxyPort();
}
/**
@@ -266,7 +266,7 @@ public class RESTClient {
*/
public RESTClient addParameter(String name, String value) {
if (!parameters.containsKey(name)) {
- parameters.put(name, new ArrayList<String>());
+ parameters.put(name, new ArrayList<>());
}
List<String> values = parameters.get(name);
@@ -306,7 +306,7 @@ public class RESTClient {
*/
public RESTClient addHeader(String name, String value) {
if (!headers.containsKey(name)) {
- headers.put(name, new ArrayList<String>());
+ headers.put(name, new ArrayList<>());
}
List<String> values = headers.get(name);
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
index 79acccb04d..d36d4c785d 100644
--- a/bpmn/pom.xml
+++ b/bpmn/pom.xml
@@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
- <groupId>org.openecomp.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
<name>BPMN Subsystem</name>
<description>BPMN Subsystem for MSO</description>