summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy96
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy440
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy51
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy470
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java150
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java9
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn321
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn321
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy104
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy124
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy180
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy235
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java84
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResource.json2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResourceCustomization.json2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml34
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml97
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml92
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml15
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml11
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy425
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java560
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java17
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml (renamed from bpmn/so-bpmn-infrastructure-common/src/test/resources/applicationContext_forPnfTesting.xml)0
-rw-r--r--bpmn/so-bpmn-building-blocks/pom.xml6
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn40
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn38
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn29
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java23
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java17
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/pom.xml60
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy)141
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy)334
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy194
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy)129
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy)4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy)149
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy542
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy194
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy)137
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy)169
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy)109
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy)2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy)300
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy)9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy)150
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy)118
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy)27
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy)91
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy)212
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy)198
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy)139
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy)91
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy)170
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy)27
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy)229
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy)216
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy)95
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java10
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java (renamed from bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java)68
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy (renamed from bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy)0
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/pom.xml91
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollbackV2.groovy72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceV2.groovy104
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn266
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn30
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn828
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn266
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn9
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn45
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn60
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn223
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn244
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn41
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn144
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn144
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollbackV2.bpmn103
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceV2.bpmn197
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn116
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn47
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn34
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn74
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn70
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java43
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml208
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml65
-rw-r--r--bpmn/so-bpmn-tasks/pom.xml6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java18
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java87
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java33
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java85
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java24
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java9
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java36
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java44
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java35
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java453
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java773
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java13
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java13
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java50
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json178
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json179
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json48
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json48
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json47
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json44
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json69
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json)4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json67
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json)1
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json65
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json67
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json69
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json (renamed from bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json)0
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json241
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json243
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json68
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json88
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json69
275 files changed, 7347 insertions, 9007 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index 005e7a3374..dfb6af793c 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -14,9 +14,7 @@
<properties>
<camunda.version>7.8.0</camunda.version>
-
<httpclient.version>4.5.5</httpclient.version>
- <jax.ws.rs>2.0.1</jax.ws.rs>
<jackson.version>1.1.1</jackson.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
index 81e2b40bb2..cae80e9137 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -28,8 +28,6 @@ import org.onap.so.rest.RESTConfig
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
-
-
class AaiUtil {
private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AaiUtil.class);
@@ -101,6 +99,15 @@ class AaiUtil {
return uri
}
+ public String getAAIServiceInstanceUri(DelegateExecution execution) {
+ String uri = getBusinessCustomerUri(execution)
+
+ uri = uri +"/" + execution.getVariable("globalSubscriberId") + "/service-subscriptions/service-subscription/" + UriUtils.encode(execution.getVariable("serviceType"),"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(execution.getVariable("serviceInstanceId"),"UTF-8")
+
+ msoLogger.debug('AaiUtil.getAAIRequestInputUri() - AAI URI: ' + uri)
+ return uri
+ }
+
//public String getBusinessCustomerUriv7(DelegateExecution execution) {
// // //def uri = getUri(execution, BUSINESS_CUSTOMERV7)
// def uri = getUri(execution, 'Customer')
@@ -646,4 +653,85 @@ class AaiUtil {
return 0
}
}
+
+ private def getPInterface(DelegateExecution execution, String aai_uri) {
+
+ String namespace = getNamespaceFromUri(aai_uri)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String serviceAaiPath = ${aai_endpoint}${aai_uri}
+
+ APIResponse response = executeAAIGetCall(execution, serviceAaiPath)
+ return new XmlParser().parseText(response.getResponseBodyAsString())
+ }
+
+ // This method checks if interface is remote
+ private def isPInterfaceRemote(DelegateExecution execution, String uri) {
+ if(uri.contains("ext-aai-network")) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ // This method returns Local and remote TPs information from AAI
+ public Map getTPsfromAAI(DelegateExecution execution) {
+ Map tpInfo = [:]
+
+ String aai_uri = '/aai/v14/network/logical-links'
+
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String serviceAaiPath = ${aai_endpoint}${aai_uri}
+
+ APIResponse response = executeAAIGetCall(execution, serviceAaiPath)
+
+ def logicalLinks = new XmlParser().parseText(response.getResponseBodyAsString())
+
+ logicalLinks."logical-links".find { link ->
+ def pInterface = []
+ def relationship = link."relationship-list"."relationship"
+ relationship.each {
+ if ("p-interface".compareToIgnoreCase(it."related-to")) {
+ pInterface.add(it)
+ }
+ }
+ if (pInterface.size() == 2) {
+ def localTP = null
+ def remoteTP = null
+
+ if (pInterface[0]."related-link".contains("ext-aai-networks")) {
+ remoteTP = pInterface[0]
+ localTP = pInterface[1]
+ }
+
+ if (pInterface[1]."related-link".contains("ext-aai-networks")) {
+ localTP = pInterface[0]
+ remoteTP = pInterface[1]
+ }
+
+ if (localTP != null && remoteTP != null) {
+
+ // give local tp
+ var intfLocal = getPInterface(execution, localTP."related-link")
+ tpInfotpInfo.put("local-access-node-id", localTP."related-link".split("/")[6])
+
+ def networkRef = intfLocal."network-ref".split("/")
+ tpInfo.put("local-access-provider-id", networkRef[1])
+ tpInfo.put("local-access-client-id", networkRef[3])
+ tpInfo.put("local-access-topology-id", networkRef[5])
+ tpInfo.put("local-access-ltp-id", localTP."interface-name")
+
+ // give local tp
+ var intfRemote = getPInterface(execution, remoteTP."related-link")
+ tpInfo.put("remote-access-node-id", remoteTP."related-link".split("/")[6])
+ def networkRefRemote = intfRemote."network-ref".split("/")
+ tpInfo.put("remote-access-provider-id", networkRefRemote[1])
+ tpInfo.put("remote-access-client-id", networkRefRemote[3])
+ tpInfo.put("remote-access-topology-id", networkRefRemote[5])
+ tpInfo.put("remote-access-ltp-id", remoteTP."interface-name")
+ }
+ }
+
+ }
+ return tpInfo
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
deleted file mode 100644
index 5aef1d6ea5..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
+++ /dev/null
@@ -1,440 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 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.onap.so.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.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class CustomE2EGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CustomE2EGetService.class);
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
index de5408fac5..4b701e6a58 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
@@ -381,15 +381,22 @@ class ExceptionUtil extends AbstractServiceTaskProcessor {
msoLogger.debug("Started processJavaException Method")
// if the BPMN flow java error handler sets "BPMN_javaExpMsg", append it to the WFE
String javaExpMsg = execution.getVariable("BPMN_javaExpMsg")
+ String errorMessage = execution.getVariable("gUnknownError")
String wfeExpMsg = "Catch a Java Lang Exception in " + processKey
if (javaExpMsg != null && !javaExpMsg.empty) {
wfeExpMsg = wfeExpMsg + ": " + javaExpMsg
}
+ if (errorMessage != null && !errorMessage.empty) {
+ msoLogger.error("Unknown Error: " + errorMessage);
+ }
+ msoLogger.error("Java Error: " + wfeExpMsg);
buildWorkflowException(execution, 2500, wfeExpMsg)
}catch(BpmnError b){
+ msoLogger.error(b);
throw b
}catch(Exception e){
+ msoLogger.error(e);
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
index 3646f26fb6..2c2cd8269c 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
@@ -22,6 +22,7 @@ package org.onap.so.bpmn.common.scripts
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
import org.onap.so.rest.RESTClient
import org.onap.so.rest.RESTConfig
@@ -36,8 +37,8 @@ class ExternalAPIUtil {
public MsoUtils utils = new MsoUtils()
ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- private AbstractServiceTaskProcessor taskProcessor
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExternalAPIUtil.class)
public static final String PostServiceOrderRequestsTemplate =
"{\n" +
@@ -62,6 +63,7 @@ class ExternalAPIUtil {
"\t\t\"action\": <action>,\n" +
"\t\t\"service\": {\n" +
"\t\t\t\"serviceState\": <serviceState>,\n" +
+ "\t\t\t\"id\": <serviceId>,\n" +
"\t\t\t\"name\": <serviceName>,\n" +
"\t\t\t\"serviceSpecification\": { \n" +
"\t\t\t\t\"id\": <serviceUuId> \n" +
@@ -81,16 +83,12 @@ class ExternalAPIUtil {
"\t} \n" +
"}"
- public ExternalAPIUtil(AbstractServiceTaskProcessor taskProcessor) {
- this.taskProcessor = taskProcessor
- }
// public String getUri(DelegateExecution execution, resourceName) {
//
-// def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
// def uri = execution.getVariable("ExternalAPIURi")
// if(uri) {
-// taskProcessor.logDebug("ExternalAPIUtil.getUri: " + uri, isDebugLogEnabled)
+// msoLogger.debug("ExternalAPIUtil.getUri: " + uri)
// return uri
// }
//
@@ -98,21 +96,21 @@ class ExternalAPIUtil {
// }
public String setTemplate(String template, Map<String, String> valueMap) {
- taskProcessor.logDebug("ExternalAPIUtil setTemplate", true);
+ msoLogger.debug("ExternalAPIUtil setTemplate", true);
StringBuffer result = new StringBuffer();
String pattern = "<.*>";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(template);
- taskProcessor.logDebug("ExternalAPIUtil template:" + template, true);
+ msoLogger.debug("ExternalAPIUtil template:" + template, true);
while (m.find()) {
String key = template.substring(m.start() + 1, m.end() - 1);
- taskProcessor.logDebug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true);
+ msoLogger.debug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true);
m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\""));
}
m.appendTail(result);
- taskProcessor.logDebug("ExternalAPIUtil return:" + result.toString(), true);
+ msoLogger.debug("ExternalAPIUtil return:" + result.toString(), true);
return result.toString();
}
@@ -128,13 +126,12 @@ class ExternalAPIUtil {
*
*/
public APIResponse executeExternalAPIGetCall(DelegateExecution execution, String url){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug(" ======== STARTED Execute ExternalAPI Get Process ======== ", isDebugEnabled)
+ msoLogger.debug(" ======== STARTED Execute ExternalAPI Get Process ======== ")
APIResponse apiResponse = null
try{
String uuid = utils.getRequestID()
- taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+ msoLogger.debug( "Generated uuid is: " + uuid)
+ msoLogger.debug( "URL to be used is: " + url)
String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_externalapi_auth"),execution.getVariable("URN_mso_msoKey"))
@@ -146,9 +143,9 @@ class ExternalAPIUtil {
}
apiResponse = client.get()
- taskProcessor.logDebug( "======== COMPLETED Execute ExternalAPI Get Process ======== ", isDebugEnabled)
+ msoLogger.debug( "======== COMPLETED Execute ExternalAPI Get Process ======== ")
}catch(Exception e){
- taskProcessor.logDebug("Exception occured while executing ExternalAPI Get Call. Exception is: \n" + e, isDebugEnabled)
+ msoLogger.debug("Exception occured while executing ExternalAPI Get Call. Exception is: \n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 9999, e.getMessage())
}
return apiResponse
@@ -167,13 +164,12 @@ class ExternalAPIUtil {
*
*/
public APIResponse executeExternalAPIPostCall(DelegateExecution execution, String url, String payload){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute ExternalAPI Post Process ======== ", isDebugEnabled)
+ msoLogger.debug( " ======== Started Execute ExternalAPI Post Process ======== ")
APIResponse apiResponse = null
try{
String uuid = utils.getRequestID()
- taskProcessor.logDebug( "Generated uuid is: " + uuid, isDebugEnabled)
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+ msoLogger.debug( "Generated uuid is: " + uuid)
+ msoLogger.debug( "URL to be used is: " + url)
String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_externalapi_auth"),execution.getVariable("URN_mso_msoKey"))
RESTConfig config = new RESTConfig(url);
@@ -184,9 +180,9 @@ class ExternalAPIUtil {
}
apiResponse = client.httpPost(payload)
- taskProcessor.logDebug( "======== Completed Execute ExternalAPI Post Process ======== ", isDebugEnabled)
+ msoLogger.debug( "======== Completed Execute ExternalAPI Post Process ======== ")
}catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing ExternalAPI Post Call. Exception is: \n" + e, isDebugEnabled)
+ msoLogger.error("Exception occured while executing ExternalAPI Post Call. Exception is: \n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 9999, e.getMessage())
}
return apiResponse
@@ -208,11 +204,10 @@ class ExternalAPIUtil {
*
*/
public APIResponse executeExternalAPIPostCall(DelegateExecution execution, String url, String payload, String authenticationHeaderValue, String headerName, String headerValue){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- taskProcessor.logDebug( " ======== Started Execute ExternalAPI Post Process ======== ", isDebugEnabled)
+ msoLogger.debug( " ======== Started Execute ExternalAPI Post Process ======== ")
APIResponse apiResponse = null
try{
- taskProcessor.logDebug( "URL to be used is: " + url, isDebugEnabled)
+ msoLogger.debug( "URL to be used is: " + url)
String basicAuthCred = utils.getBasicAuth(execution.getVariable("URN_externalapi_auth"),execution.getVariable("URN_mso_msoKey"))
@@ -223,9 +218,9 @@ class ExternalAPIUtil {
}
apiResponse = client.httpPost(payload)
- taskProcessor.logDebug( "======== Completed Execute ExternalAPI Post Process ======== ", isDebugEnabled)
+ msoLogger.debug( "======== Completed Execute ExternalAPI Post Process ======== ")
}catch(Exception e){
- taskProcessor.utils.log("ERROR", "Exception occured while executing ExternalAPI Post Call. Exception is: \n" + e, isDebugEnabled)
+ msoLogger.error("Exception occured while executing ExternalAPI Post Call. Exception is: \n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 9999, e.getMessage())
}
return apiResponse
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
deleted file mode 100644
index 857df16772..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
+++ /dev/null
@@ -1,470 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common.scripts
-
-import org.onap.so.bpmn.core.UrnPropertiesReader
-
-import org.apache.commons.lang3.StringEscapeUtils
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class GenericGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericGetService.class);
-
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- boolean nodeExists = isBlank(globalCustomerId) ? utils.nodeExists(aaiResponse, "result-data") : hasCustomerServiceInstance(aaiResponse, globalCustomerId)
- if(nodeExists){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
- /**
- * An utility method which check whether a service(by name) is already present within a globalCustomerId or not.
- * @param jsonResponse raw response received from AAI by searching ServiceInstance by Name.
- * @param globalCustomerId
- * @return {@code true} if globalCustomerId is found at 6th position within "resource-link", {@code false} in any other cases.
- */
- public boolean hasCustomerServiceInstance(String aaiResponse, final String globalCustomerId) {
- if (isBlank(aaiResponse)) {
- return false
- }
- aaiResponse = utils.removeXmlNamespaces(aaiResponse)
- ArrayList<String> linksArray = utils.getMultNodeObjects(aaiResponse, "resource-link")
- if (linksArray == null || linksArray.size() == 0) {
- return false
- }
- for (String resourceLink : linksArray) {
- int custStart = resourceLink.indexOf("customer/")
- int custEnd = resourceLink.indexOf("/service-subscriptions/")
- String receivedCustomerId = resourceLink.substring(custStart + 9, custEnd)
- if (globalCustomerId.equals(receivedCustomerId)) {
- return true
- }
- }
- return false
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
index d41134be91..8cc756d412 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -67,7 +67,7 @@ import org.onap.so.logger.MsoLogger
* @param - GENPS_tunnelXconnectId - Conditional Field. Required for tunnel-xconnect.
*
* @param - GENPS_serviceResourceVersion - Conditional Field. Needs to be provided only in case of update for both service-instance and service subscription. The calling flows
- * should check if a service-instance or servic-subscription exists by calling the subflow GenericGetService. if it exists then resourceversion should be
+ * should check if a service-instance or servic-subscription exists by calling the subflow. if it exists then resourceversion should be
* obtained from aai and sent as an input parameter.
*
* Outgoing Variables:
@@ -104,7 +104,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
String tunnelXconnectId = execution.getVariable("GENPS_tunnelXconnectId")
String type = execution.getVariable("GENPS_type")
-
+
if(type != null){
msoLogger.debug("Incoming GENPS_type is: " + type)
if(type.equalsIgnoreCase("service-instance")){
@@ -201,7 +201,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String serviceType = execution.getVariable("GENPS_serviceType")
msoLogger.debug(" Incoming GENPS_serviceType is: " + serviceType)
-
+
String globalSubscriberId = execution.getVariable("GENPS_globalSubscriberId")
msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
index d3ddc60d3e..ca1acc5963 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
@@ -48,8 +48,8 @@ public class PayloadClient {
UpgradeAction payloadResult = new UpgradeAction();
ConfigurationParametersUpgrade configParams = new ConfigurationParametersUpgrade();
String payloadString = payload.isPresent() ? payload.get() : "";
- String existingSoftware = JsonUtils.getJsonValue(payloadString, "existing-software-version");
- String newSoftware = JsonUtils.getJsonValue(payloadString, "new-software-version");
+ String existingSoftware = JsonUtils.getJsonValue(payloadString, "existing_software_version");
+ String newSoftware = JsonUtils.getJsonValue(payloadString, "new_software_version");
configParams.setExistingSoftwareVersion(existingSoftware);
configParams.setNewSoftwareVersion(newSoftware);
configParams.setVnfName(vnfName);
@@ -69,7 +69,7 @@ public class PayloadClient {
QuiesceTrafficAction payloadResult = new QuiesceTrafficAction();
ConfigurationParametersQuiesce configParams = new ConfigurationParametersQuiesce();
String payloadString = payload.isPresent() ? payload.get() : "";
- String operationsTimeout = JsonUtils.getJsonValue(payloadString, "operations-timeout");
+ String operationsTimeout = JsonUtils.getJsonValue(payloadString, "operations_timeout");
configParams.setOperationsTimeout(operationsTimeout);
configParams.setVnfName(vnfName);
payloadResult.setConfigurationParameters(configParams);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
index ff51b06dbe..6bd397a63a 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
@@ -27,15 +27,15 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"vnf_name",
-"existing-software-version",
-"new-software-version"
+"existing_software_version",
+"new_software_version"
})
public class ConfigurationParametersUpgrade {
@JsonProperty("vnf_name")
private String vnfName;
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
private String existingSoftwareVersion;
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
private String newSoftwareVersion;
@JsonProperty("vnf_name")
@@ -48,22 +48,22 @@ public void setVnfName(String vnfName) {
this.vnfName = vnfName;
}
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
public String getExistingSoftwareVersion() {
return existingSoftwareVersion;
}
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
public void setExistingSoftwareVersion(String existingSoftwareVersion) {
this.existingSoftwareVersion = existingSoftwareVersion;
}
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
public String getNewSoftwareVersion() {
return newSoftwareVersion;
}
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
public void setNewSoftwareVersion(String newSoftwareVersion) {
this.newSoftwareVersion = newSoftwareVersion;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
index 5746dcd586..38f974168e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
@@ -38,6 +38,8 @@ public class BuildingBlock implements Serializable{
private String key;
@JsonProperty("is-virtual-link")
private boolean isVirtualLink;
+ @JsonProperty("virtual-link-key")
+ private String virtualLinkKey;
public String getBpmnFlowName() {
return bpmnFlowName;
@@ -63,4 +65,10 @@ public class BuildingBlock implements Serializable{
public void setIsVirtualLink(boolean isVirtualLink) {
this.isVirtualLink = isVirtualLink;
}
+ public String getVirtualLinkKey() {
+ return virtualLinkKey;
+ }
+ public void setVirtualLinkKey(String virtualLinkKey) {
+ this.virtualLinkKey = virtualLinkKey;
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
index 6ceac935f1..349010781d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
@@ -27,7 +27,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class ModelInfoCollection implements Serializable {
private static final long serialVersionUID = 8380534468706675508L;
-
+
+ @JsonProperty("model-customization-uuid")
+ private String modelCustomizationUUID;
@JsonProperty("model-version-id")
private String modelVersionId;
@JsonProperty("model-invariant-uuid")
@@ -43,6 +45,12 @@ public class ModelInfoCollection implements Serializable {
@JsonProperty("quantity")
private int quantity;
+ public String getModelCustomizationUUID() {
+ return modelCustomizationUUID;
+ }
+ public void setModelCustomizationUUID(String modelCustomizationUUID) {
+ this.modelCustomizationUUID = modelCustomizationUUID;
+ }
public String getModelVersionId() {
return modelVersionId;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index aa68114011..b5203c676a 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -65,6 +65,7 @@ import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResource;
import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
@@ -246,14 +247,18 @@ public class BBInputSetup implements JavaDelegate {
org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness = requestDetails.getLineOfBusiness();
if (modelType.equals(ModelType.network)) {
+ lookupKeyMap.put(ResourceKey.NETWORK_ID, resourceId);
this.populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, null);
} else if (modelType.equals(ModelType.vnf)) {
+ lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, resourceId);
this.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName, serviceInstance,
lookupKeyMap, relatedInstanceList, resourceId, vnfType, null);
} else if (modelType.equals(ModelType.volumeGroup)) {
+ lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, resourceId);
this.populateVolumeGroup(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
relatedInstanceList, instanceName, vnfType, null);
} else if (modelType.equals(ModelType.vfModule)) {
+ lookupKeyMap.put(ResourceKey.VF_MODULE_ID, resourceId);
this.populateVfModule(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
relatedInstanceList, instanceName, null, requestDetails.getCloudConfiguration());
} else {
@@ -320,8 +325,6 @@ public class BBInputSetup implements JavaDelegate {
protected void populateVfModule(ModelInfo modelInfo, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId,
RelatedInstanceList[] relatedInstanceList, String instanceName, List<Map<String, String>> instanceParams, CloudConfiguration cloudConfiguration) throws Exception {
- boolean foundByName = false;
- boolean foundById = false;
String vnfModelCustomizationUUID = null;
if (relatedInstanceList != null) {
for (RelatedInstanceList relatedInstList : relatedInstanceList) {
@@ -349,29 +352,31 @@ public class BBInputSetup implements JavaDelegate {
cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()).getModelCustomizationId();
if(modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) {
lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId());
+ break;
}
}
break;
}
}
if (vnf != null) {
- for (VfModule vfModule : vnf.getVfModules()) {
+ VfModule vfModule = null;
+ for (VfModule vfModuleTemp : vnf.getVfModules()) {
if (lookupKeyMap.get(ResourceKey.VF_MODULE_ID) != null
- && vfModule.getVfModuleId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.VF_MODULE_ID))) {
- foundById = true;
- this.mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
- } else if (instanceName != null && vfModule.getVfModuleName().equalsIgnoreCase(instanceName)) {
- foundByName = true;
- lookupKeyMap.put(ResourceKey.VF_MODULE_ID, vfModule.getVfModuleId());
- this.mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
+ && vfModuleTemp.getVfModuleId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.VF_MODULE_ID))) {
+ vfModule = vfModuleTemp;
+ String vfModuleCustId = bbInputSetupUtils.getAAIVfModule(vnf.getVnfId(), vfModule.getVfModuleId()).getModelCustomizationId();
+ modelInfo.setModelCustomizationId(vfModuleCustId);
+ break;
}
}
- if (!foundByName && !foundById && bbName.equalsIgnoreCase(AssignFlows.VF_MODULE.toString())) {
- VfModule vfModule = this.createVfModule(lookupKeyMap,
+ if (vfModule == null && bbName.equalsIgnoreCase(AssignFlows.VF_MODULE.toString())) {
+ vfModule = createVfModule(lookupKeyMap,
resourceId, instanceName, instanceParams);
- this.mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
vnf.getVfModules().add(vfModule);
}
+ if(vfModule != null) {
+ mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
+ }
} else {
msoLogger.debug("Related VNF instance Id not found: " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
throw new Exception("Could not find relevant information for related VNF");
@@ -422,48 +427,47 @@ public class BBInputSetup implements JavaDelegate {
protected void populateVolumeGroup(ModelInfo modelInfo, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId,
RelatedInstanceList[] relatedInstanceList, String instanceName, String vnfType, List<Map<String, String>> instanceParams) throws Exception {
- boolean foundByName = false;
- boolean foundById = false;
+ VolumeGroup volumeGroup = null;
+ GenericVnf vnf = null;
String vnfModelCustomizationUUID = null;
+ String generatedVnfType = vnfType;
+ if (generatedVnfType == null || generatedVnfType.isEmpty()) {
+ generatedVnfType = service.getModelName() + "/" + modelInfo.getModelCustomizationName();
+ }
if (relatedInstanceList != null) {
for (RelatedInstanceList relatedInstList : relatedInstanceList) {
RelatedInstance relatedInstance = relatedInstList.getRelatedInstance();
if (relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)) {
vnfModelCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationUuid();
+ break;
}
}
}
- GenericVnf vnf = null;
for (GenericVnf tempVnf : serviceInstance.getVnfs()) {
if (tempVnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
vnf = tempVnf;
- vnfModelCustomizationUUID = this.bbInputSetupUtils.getAAIGenericVnf(vnf.getVnfId())
+ vnfModelCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnf.getVnfId())
.getModelCustomizationId();
ModelInfo vnfModelInfo = new ModelInfo();
vnfModelInfo.setModelCustomizationUuid(vnfModelCustomizationUUID);
- this.mapCatalogVnf(tempVnf, vnfModelInfo, service);
+ mapCatalogVnf(tempVnf, vnfModelInfo, service);
break;
}
}
if (vnf != null && vnfModelCustomizationUUID != null) {
- for (VolumeGroup volumeGroup : vnf.getVolumeGroups()) {
- if (lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID) != null && volumeGroup.getVolumeGroupId()
+ for (VolumeGroup volumeGroupTemp : vnf.getVolumeGroups()) {
+ if (lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID) != null && volumeGroupTemp.getVolumeGroupId()
.equalsIgnoreCase(lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID))) {
- foundById = true;
- this.mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
- } else if (instanceName != null && volumeGroup.getVolumeGroupName().equalsIgnoreCase(instanceName)) {
- foundByName = true;
- lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId());
- this.mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
+ volumeGroup = volumeGroupTemp;
+ break;
}
}
- if (!foundByName && !foundById && bbName.equalsIgnoreCase(AssignFlows.VOLUME_GROUP.toString())) {
- if (vnfType == null || vnfType.isEmpty()) {
- vnfType = service.getModelName() + "/" + modelInfo.getModelCustomizationName();
- }
- VolumeGroup volumeGroup = this.createVolumeGroup(lookupKeyMap, resourceId, instanceName, vnfType, instanceParams);
+ if (volumeGroup == null && bbName.equalsIgnoreCase(AssignFlows.VOLUME_GROUP.toString())) {
+ volumeGroup = createVolumeGroup(lookupKeyMap, resourceId, instanceName, generatedVnfType, instanceParams);
vnf.getVolumeGroups().add(volumeGroup);
- this.mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
+ }
+ if(volumeGroup != null) {
+ mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
}
} else {
msoLogger.debug("Related VNF instance Id not found: " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
@@ -521,10 +525,13 @@ public class BBInputSetup implements JavaDelegate {
org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap,
RelatedInstanceList[] relatedInstanceList, String resourceId, String vnfType, List<Map<String, String>> instanceParams) {
- boolean foundByName = false;
- boolean foundById = false;
+ GenericVnf vnf = null;
ModelInfo instanceGroupModelInfo = null;
String instanceGroupId = null;
+ String generatedVnfType = vnfType;
+ if (generatedVnfType == null || generatedVnfType.isEmpty()) {
+ generatedVnfType = service.getModelName() + "/" + modelInfo.getModelCustomizationName();
+ }
if (relatedInstanceList != null) {
for (RelatedInstanceList relatedInstList : relatedInstanceList) {
RelatedInstance relatedInstance = relatedInstList.getRelatedInstance();
@@ -534,36 +541,26 @@ public class BBInputSetup implements JavaDelegate {
}
}
}
- for (GenericVnf genericVnf : serviceInstance.getVnfs()) {
+ for (GenericVnf vnfTemp : serviceInstance.getVnfs()) {
if (lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID) != null
- && genericVnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
- foundById = true;
- org.onap.aai.domain.yang.GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(genericVnf.getVnfId());
- if(vnf!=null){
- modelInfo.setModelCustomizationUuid(vnf.getModelCustomizationId());
- }
- this.mapCatalogVnf(genericVnf, modelInfo, service);
- } else if (instanceName != null && genericVnf.getVnfName().equalsIgnoreCase(instanceName)) {
- foundByName = true;
- lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, genericVnf.getVnfId());
- org.onap.aai.domain.yang.GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(genericVnf.getVnfId());
- if(vnf!=null){
- modelInfo.setModelCustomizationUuid(vnf.getModelCustomizationId());
- }
- this.mapCatalogVnf(genericVnf, modelInfo, service);
+ && vnfTemp.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
+ String vnfModelCustId = bbInputSetupUtils.getAAIGenericVnf(vnfTemp.getVnfId()).getModelCustomizationId();
+ modelInfo.setModelCustomizationUuid(vnfModelCustId);
+ vnf = vnfTemp;
+ break;
}
}
- if (!foundByName && !foundById && bbName.equalsIgnoreCase(AssignFlows.VNF.toString())) {
- if(vnfType == null || vnfType.isEmpty()) {
- vnfType = service.getModelName() + "/" + modelInfo.getModelCustomizationName();
+ if (vnf == null && bbName.equalsIgnoreCase(AssignFlows.VNF.toString())) {
+ vnf = createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness,
+ resourceId, generatedVnfType, instanceParams);
+ serviceInstance.getVnfs().add(vnf);
+ }
+ if(vnf != null) {
+ mapCatalogVnf(vnf, modelInfo, service);
+ mapVnfcCollectionInstanceGroup(vnf, modelInfo, service);
+ if (instanceGroupId != null && instanceGroupModelInfo != null) {
+ mapNetworkCollectionInstanceGroup(vnf, instanceGroupId);
}
- GenericVnf genericVnf = this.createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness,
- resourceId, vnfType, instanceParams);
- serviceInstance.getVnfs().add(genericVnf);
- this.mapCatalogVnf(genericVnf, modelInfo, service);
- this.mapVnfcCollectionInstanceGroup(genericVnf, modelInfo, service);
- if (instanceGroupId != null && instanceGroupModelInfo != null)
- this.mapNetworkCollectionInstanceGroup(genericVnf, instanceGroupId);
}
}
@@ -584,7 +581,7 @@ public class BBInputSetup implements JavaDelegate {
}
protected void mapNetworkCollectionInstanceGroup(GenericVnf genericVnf, String instanceGroupId) {
- org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = this.bbInputSetupUtils
+ org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = bbInputSetupUtils
.getAAIInstanceGroup(instanceGroupId);
InstanceGroup instanceGroup = this.mapperLayer.mapAAIInstanceGroupIntoInstanceGroup(aaiInstanceGroup);
instanceGroup.setModelInfoInstanceGroup(this.mapperLayer.mapCatalogInstanceGroupToInstanceGroup(
@@ -635,25 +632,22 @@ public class BBInputSetup implements JavaDelegate {
protected void populateL3Network(String instanceName, ModelInfo modelInfo, Service service, String bbName,
ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId, List<Map<String, String>> instanceParams) {
- boolean foundByName = false;
- boolean foundById = false;
- for (L3Network network : serviceInstance.getNetworks()) {
+ L3Network network = null;
+ for (L3Network networkTemp : serviceInstance.getNetworks()) {
if (lookupKeyMap.get(ResourceKey.NETWORK_ID) != null
- && network.getNetworkId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.NETWORK_ID))) {
- foundById = true;
- this.mapCatalogNetwork(network, modelInfo, service);
- } else if (instanceName != null && network.getNetworkName().equalsIgnoreCase(instanceName)) {
- foundByName = true;
- lookupKeyMap.put(ResourceKey.NETWORK_ID, network.getNetworkId());
- this.mapCatalogNetwork(network, modelInfo, service);
+ && networkTemp.getNetworkId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.NETWORK_ID))) {
+ network = networkTemp;
+ break;
}
}
- if (!foundByName && !foundById
+ if (network == null
&& (bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString())
|| bbName.equalsIgnoreCase(AssignFlows.NETWORK_MACRO.toString()))) {
- L3Network l3Network = this.createNetwork(lookupKeyMap, instanceName, resourceId, instanceParams);
- serviceInstance.getNetworks().add(l3Network);
- this.mapCatalogNetwork(l3Network, modelInfo, service);
+ network = createNetwork(lookupKeyMap, instanceName, resourceId, instanceParams);
+ serviceInstance.getNetworks().add(network);
+ }
+ if(network != null) {
+ mapCatalogNetwork(network, modelInfo, service);
}
}
@@ -1452,7 +1446,9 @@ public class BBInputSetup implements JavaDelegate {
aaiCollection = aaiCollectionOp.get();
Collection collection = this.mapperLayer.mapAAICollectionIntoCollection(aaiCollection);
-
+ NetworkCollectionResourceCustomization collectionResourceCust =
+ bbInputSetupUtils.getCatalogNetworkCollectionResourceCustByID(aaiCollection.getCollectionCustomizationId());
+ collection.setModelInfoCollection(mapperLayer.mapCatalogCollectionToCollection(collectionResourceCust, collectionResourceCust.getCollectionResource()));
Optional<Relationships> relationshipsOp = collectionWrapper.getRelationships();
Relationships relationships = null;
if (relationshipsOp.isPresent()) {
@@ -1493,7 +1489,7 @@ public class BBInputSetup implements JavaDelegate {
Relationships relationships = relationshipsOp.get();
this.mapNetworkPolicies(relationships.getByType(AAIObjectType.NETWORK_POLICY),
network.getNetworkPolicies());
- this.mapRouteTableReferences(relationships.getByType(AAIObjectType.ROUTE_TABLE_REFERENCE),
+ mapRouteTableReferences(relationships.getByType(AAIObjectType.ROUTE_TABLE_REFERENCE),
network.getContrailNetworkRouteTableReferences());
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 04f9cdcb86..c2161a4fee 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -142,6 +142,10 @@ public class BBInputSetupMapperLayer {
protected VfModule mapAAIVfModule(org.onap.aai.domain.yang.VfModule aaiVfModule) {
VfModule vfModule = modelMapper.map(aaiVfModule, VfModule.class);
vfModule.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiVfModule.getOrchestrationStatus()));
+
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setIsBaseBoolean(aaiVfModule.isIsBaseVfModule());
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
return vfModule;
}
@@ -175,7 +179,7 @@ public class BBInputSetupMapperLayer {
protected ModelInfoInstanceGroup mapCatalogInstanceGroupToInstanceGroup(CollectionResourceCustomization collectionCust, InstanceGroup instanceGroup) {
ModelInfoInstanceGroup modelInfoInstanceGroup = modelMapper.map(instanceGroup, ModelInfoInstanceGroup.class);
- if(instanceGroup.getType().equals(InstanceGroupType.L3_NETWORK))
+ if(instanceGroup.getType() != null && instanceGroup.getType().equals(InstanceGroupType.L3_NETWORK))
modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_L3_NETWORK);
else
modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_VNFC);
@@ -201,6 +205,7 @@ public class BBInputSetupMapperLayer {
modelInfoCollection.setDescription(collectionResource.getDescription());
modelInfoCollection.setModelInvariantUUID(collectionResource.getModelInvariantUUID());
modelInfoCollection.setModelVersionId(collectionResource.getModelUUID());
+ modelInfoCollection.setModelCustomizationUUID(collectionCust.getModelCustomizationUUID());
return modelInfoCollection;
}
@@ -461,4 +466,4 @@ public class BBInputSetupMapperLayer {
CollectionNetworkResourceCustomization collectionNetworkResourceCust) {
return modelMapper.map(collectionNetworkResourceCust, NetworkResourceCustomization.class);
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 14c162935a..4b85538428 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -49,6 +49,7 @@ import org.onap.so.client.db.request.RequestsDbClient;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
+import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -127,6 +128,11 @@ public class BBInputSetupUtils {
return catalogDbClient.getCollectionNetworkResourceCustomizationByID(key);
}
+ public NetworkCollectionResourceCustomization getCatalogNetworkCollectionResourceCustByID(
+ String collectionCustomizationId) {
+ return catalogDbClient.getNetworkCollectionResourceCustomizationByID(collectionCustomizationId);
+ }
+
public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroups(String modelCustomizationUUID) {
return catalogDbClient.getVnfcInstanceGroupsByVnfResourceCust(modelCustomizationUUID);
}
@@ -389,8 +395,8 @@ public class BBInputSetupUtils {
}
}
- public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vfModuleId, String volumeGroupName) throws Exception {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vfModuleId);
+ public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId, String volumeGroupName) throws Exception {
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
VolumeGroup volumeGroup = null;
@@ -406,4 +412,4 @@ public class BBInputSetupUtils {
return Optional.of(volumeGroup);
}
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
deleted file mode 100644
index 90722a95f3..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" 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="CustomE2EGetService" name="CustomE2EGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
deleted file mode 100644
index 2015526874..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
- <bpmn2:process id="GenericGetService" name="GenericGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy
deleted file mode 100644
index a8c10b1e81..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.runners.MockitoJUnitRunner
-
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.when
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName
-
-/**
- * @author sushilma
- * @since January 10, 2018
- */
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class CustomE2EGetServiceTest extends MsoGroovyTest {
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090)
-
- @Captor
- static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
-
- @Test
- public void testObtainServiceInstanceUrlById (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.obtainServiceInstanceUrlById(mockExecution)
- Mockito.verify(mockExecution, times(9)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-
- @Test
- public void testObtainServiceInstanceUrlByName (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceName")).thenReturn("1604-MVM-26")
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.obtainServiceInstanceUrlByName(mockExecution)
- Mockito.verify(mockExecution, times(8)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-
- @Test
- public void testServiceObject (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENGS_resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/1234453")
- MockGetServiceInstance("MSO_1610_dev", "MSO-dev-service-type", "1234453", "GenericFlows/getServiceInstance.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.getServiceObject(mockExecution)
- Mockito.verify(mockExecution, times(7)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy
deleted file mode 100644
index 49edd813f7..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.runners.MockitoJUnitRunner
-import org.onap.so.bpmn.core.WorkflowException
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*
-import static org.mockito.Mockito.*
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericGetServiceTest {
-
- def prefix = "GENGS_"
- @Captor
- ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class);
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(8090);
-
- @Test
- public void testGetServiceObject() {
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn('http://localhost:8090')
- when(mockExecution.getVariable(prefix + "type")).thenReturn('service-instance')
- when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn('12345')
- when(mockExecution.getVariable(prefix + "resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
-
- mockData()
- GenericGetService obj = new GenericGetService()
- obj.getServiceObject(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix", prefix)
- Mockito.verify(mockExecution).setVariable(prefix + "getServiceUrl", "http://localhost:8090/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- Mockito.verify(mockExecution).setVariable(prefix + "getServiceResponseCode", 200)
- }
-
- @Test
- public void testGetServiceObjectEndpointNull() {
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix + "type")).thenReturn('service-instance')
- when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn('12345')
- when(mockExecution.getVariable(prefix + "resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
-
- mockData()
- try {
- GenericGetService obj = new GenericGetService()
- obj.getServiceObject(mockExecution)
- } catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- private void mockData() {
- stubFor(get(urlMatching(".*/aai/v[0-9]+/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/.*"))
- .willReturn(aResponse()
- .withStatus(200).withHeader("Content-Type", "text/xml")
- .withBodyFile("")))
- }
-
- private ExecutionEntity setupMock() {
-
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("GenericGetService")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("GenericGetService")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("GenericGetService")
- when(mockExecution.getProcessInstanceId()).thenReturn("GenericGetService")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
- return mockExecution
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy
deleted file mode 100644
index 1aef78f0d5..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.onap.so.bpmn.core.WorkflowException
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*
-import static org.mockito.Mockito.mock
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.when
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericGetVnfTest {
-
- def prefix = "GENGV_"
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090)
-
- @Captor
- static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
-
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
- }
-
- @Test
- public void testGetVnfByName() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable(prefix+"vnfName")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfByName(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix","GENGV_")
- Mockito.verify(mockExecution).setVariable(prefix+"getVnfPath","http://localhost:28090/aai/v9/network/generic-vnfs/generic-vnf?vnf-name=genricVnf_test&depth=1")
- }
-
- @Test
- public void testGetVnfByNameEndpointNull() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix+"vnfName")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- try{
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfByName(mockExecution)
- }catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- @Test
- public void testGetVnfById() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable(prefix+"vnfId")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfById(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix","GENGV_")
- Mockito.verify(mockExecution).setVariable(prefix+"getVnfPath","http://localhost:28090/aai/v9/network/generic-vnfs/generic-vnf/genricVnf_test?depth=1")
- }
-
- @Test
- public void testGetVnfByIdEndpointNull() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix+"vnfId")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- try{
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfById(mockExecution)
- }catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- private static ExecutionEntity setupMock() {
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("DoCreateVfModule")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVfModule")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVfModule")
- when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVfModule")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
-
- return mockExecution
- }
-
- private static void mockData() {
- stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf.*"))
- .willReturn(aResponse()
- .withStatus(200).withHeader("Content-Type", "text/xml")
- .withBodyFile("GenericFlows/getGenericVnfResponse.xml")))
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy
deleted file mode 100644
index d4ea8ce71f..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy
+++ /dev/null
@@ -1,235 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common.scripts
-
-import static org.mockito.Mockito.*
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutServiceInstance;
-
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.MockitoAnnotations
-import org.mockito.internal.debugging.MockitoDebuggerImpl
-import org.mockito.runners.MockitoJUnitRunner
-
-import com.github.tomakehurst.wiremock.client.WireMock
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.apache.commons.lang3.*
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericPutServiceTest {
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(8090);
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
-
- }
-
- @Test
- public void preProcessRequest() {
-
-
- println "************ preProcessRequest ************* "
-
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("GENPS_type")).thenReturn("service-instance")
-
- GenericPutService putServiceInstance= new GenericPutService()
- putServiceInstance.preProcessRequest(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", false)
- // verify(mockExecution).setVariable("globalSubscriberId", "1604-MVM-26")
- // verify(mockExecution).setVariable("serviceInstanceId", "MIS%2F1604%2F0026%2FSW_INTERNET")
- // verify(mockExecution).setVariable("serviceType", "SDN-ETHERNET-INTERNET")
- // verify(mockExecution).setVariable("ServiceInstanceData", "f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
-
- }
-
-
- @Test
- @Ignore
- public void putServiceInstance() {
- println "************ putServiceInstance ************* "
-
- WireMock.reset();
-
- MockPutServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml");
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
- when(mockExecution.getVariable("mso.workflow.PutServiceInstance.aai.business.customer.uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("GENPS_type")).thenReturn("service-instance")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("7")
- when(mockExecution.getVariable("mso.workflow.default.aai.v7.customer.uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
- when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
-
- GenericPutService serviceInstance= new GenericPutService()
- serviceInstance.putServiceInstance(mockExecution)
-
- // check the sequence of variable invocation
- MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
- // verify(mockExecution).setVariable("GENPSI_serviceInstanceData","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- String servicePayload = """<service-instance xmlns="http://org.openecomp.aai.inventory/v7">f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance>""" as String
- verify(mockExecution).setVariable("GENPS_serviceInstancePayload",servicePayload)
-
- String serviceAaiPath = "http://localhost:28090/aai/v7/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"
- verify(mockExecution).setVariable("GENPS_putServiceInstanceAaiPath", serviceAaiPath)
-
- int responseCode = 200
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponseCode", responseCode)
-
- String aaiResponse = """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Content-Length" value="0"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
-</rest:RESTResponse>"""
-
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponse", aaiResponse)
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", true)
- }
-
- @Test
- @Ignore
- public void putServiceInstance_404() {
-
-
- println "************ putServiceInstance ************* "
-
- WireMock.reset();
-
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_ServiceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
- when(mockExecution.getVariable("mso.workflow.PutServiceInstance.aai.business.customer_uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("GENPS_ServiceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- GenericPutService serviceInstance= new GenericPutService()
- serviceInstance.putServiceInstance(mockExecution)
-
- // check the sequence of variable invocation
- MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
-
-
- verify(mockExecution).setVariable("GENPS_serviceInstanceData","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- String serviceInstancepayload = """<service-instance xmlns="http://org.onap.so.aai.inventory/v7">f70e927b-6087-4974-9ef8-c5e4d5847ca4
- </service-instance>""" as String
- verify(mockExecution).setVariable("GENPS_serviceInstancePayload",serviceInstancepayload)
-
- String serviceInstanceAaiPath = "http://localhost:8090/aai/v7/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"
- verify(mockExecution).setVariable("GENPS_putServiceInstanceAaiPath", serviceInstanceAaiPath)
-
- int responseCode = 404
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponseCode", responseCode)
-
- String aaiResponse = ""
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponse", aaiResponse)
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", false)
-
-
- }
-
-
- private ExecutionEntity setupMock() {
-
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("PutServiceInstance")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("PutServiceInstance")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
-
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("PutServiceInstance")
- when(mockExecution.getProcessInstanceId()).thenReturn("PutServiceInstance")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
-
- return mockExecution
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
index 8d681d721c..80b978e4fd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
@@ -31,10 +31,10 @@ public class PayloadClientTest {
@Test
public void upgradeFormatTest() throws Exception {
- String payloadResult = "{\"configuration-parameters\":{\"vnf_name\":\"vnfName1\",\"existing-software-version\":\"existingVersion\",\"new-software-version\":\"newVersion\"}}";
+ String payloadResult = "{\"configuration-parameters\":{\"vnf_name\":\"vnfName1\",\"existing_software_version\":\"existingVersion\",\"new_software_version\":\"newVersion\"}}";
JSONObject jsonObject = new JSONObject();
- jsonObject.put("existing-software-version", "existingVersion");
- jsonObject.put("new-software-version", "newVersion");
+ jsonObject.put("existing_software_version", "existingVersion");
+ jsonObject.put("new_software_version", "newVersion");
Optional<String> payload = Optional.of(jsonObject.toString());
Optional<String> payloadClient = PayloadClient.upgradeFormat(payload, "vnfName1");
assertEquals(payloadResult, payloadClient.get());
@@ -51,7 +51,7 @@ public class PayloadClientTest {
public void quiesceTrafficFormatTest() throws Exception {
String payloadResult = "{\"configuration-parameters\":{\"vnf_name\":\"vnfName1\",\"operations_timeout\":\"operationTimeout\"}}";
JSONObject jsonObject = new JSONObject();
- jsonObject.put("operations-timeout", "operationTimeout");
+ jsonObject.put("operations_timeout", "operationTimeout");
Optional<String> payload = Optional.of(jsonObject.toString());
Optional<String> payloadClient = PayloadClient.quiesceTrafficFormat(payload, "vnfName1");
assertEquals(payloadResult, payloadClient.get());
@@ -78,4 +78,4 @@ public class PayloadClientTest {
assertEquals(payloadResult, payloadClient.get());
}
-} \ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index 355dc15bbf..a821d69754 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -658,8 +658,8 @@ public class BBInputSetupTest {
public void testPopulateObjectsOnAssignAndCreateFlows() throws Exception {
String bbName = AssignFlows.SERVICE_INSTANCE.toString();
String instanceName = "instanceName";
- String resourceId = "123";
String vnfType = "vnfType";
+ String resourceId = "networkId";
Service service = Mockito.mock(Service.class);
ServiceInstance serviceInstance = Mockito.mock(ServiceInstance.class);
RequestDetails requestDetails = Mockito.mock(RequestDetails.class);
@@ -675,12 +675,6 @@ public class BBInputSetupTest {
doNothing().when(SPY_bbInputSetup).populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance,
lookupKeyMap, resourceId, null);
- doNothing().when(SPY_bbInputSetup).populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness,
- service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null);
- doNothing().when(SPY_bbInputSetup).populateVolumeGroup(modelInfo, service, bbName, serviceInstance,
- lookupKeyMap, resourceId, relatedInstanceList, instanceName, vnfType, null);
- doNothing().when(SPY_bbInputSetup).populateVfModule(modelInfo, service, bbName, serviceInstance, lookupKeyMap,
- resourceId, relatedInstanceList, instanceName, null, cloudConfiguration);
doReturn(modelInfo).when(requestDetails).getModelInfo();
doReturn(requestInfo).when(requestDetails).getRequestInfo();
doReturn(instanceName).when(requestInfo).getInstanceName();
@@ -690,36 +684,41 @@ public class BBInputSetupTest {
doReturn(cloudConfiguration).when(requestDetails).getCloudConfiguration();
doReturn(ModelType.network).when(modelInfo).getModelType();
-
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance,
lookupKeyMap, resourceId, vnfType);
-
verify(SPY_bbInputSetup, times(1)).populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance,
lookupKeyMap, resourceId, null);
+ assertEquals("NetworkId populated", true, lookupKeyMap.get(ResourceKey.NETWORK_ID).equalsIgnoreCase(resourceId));
doReturn(ModelType.vnf).when(modelInfo).getModelType();
-
+ resourceId = "vnfId";
+ doNothing().when(SPY_bbInputSetup).populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness,
+ service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance,
lookupKeyMap, resourceId, vnfType);
-
verify(SPY_bbInputSetup, times(1)).populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness,
service, bbName, serviceInstance, lookupKeyMap, relatedInstanceList, resourceId, vnfType, null);
+ assertEquals("VnfId populated", true, lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID).equalsIgnoreCase(resourceId));
doReturn(ModelType.volumeGroup).when(modelInfo).getModelType();
-
+ resourceId = "volumeGroupId";
+ doNothing().when(SPY_bbInputSetup).populateVolumeGroup(modelInfo, service, bbName, serviceInstance,
+ lookupKeyMap, resourceId, relatedInstanceList, instanceName, vnfType, null);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance,
lookupKeyMap, resourceId, vnfType);
-
verify(SPY_bbInputSetup, times(1)).populateVolumeGroup(modelInfo, service, bbName, serviceInstance,
lookupKeyMap, resourceId, relatedInstanceList, instanceName, vnfType, null);
+ assertEquals("VolumeGroupId populated", true, lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID).equalsIgnoreCase(resourceId));
doReturn(ModelType.vfModule).when(modelInfo).getModelType();
-
+ resourceId = "vfModuleId";
+ doNothing().when(SPY_bbInputSetup).populateVfModule(modelInfo, service, bbName, serviceInstance, lookupKeyMap,
+ resourceId, relatedInstanceList, instanceName, null, cloudConfiguration);
SPY_bbInputSetup.populateObjectsOnAssignAndCreateFlows(requestDetails, service, bbName, serviceInstance,
lookupKeyMap, resourceId, vnfType);
-
verify(SPY_bbInputSetup, times(1)).populateVfModule(modelInfo, service, bbName, serviceInstance, lookupKeyMap,
resourceId, relatedInstanceList, instanceName, null, cloudConfiguration);
+ assertEquals("VfModuleId populated", true, lookupKeyMap.get(ResourceKey.VF_MODULE_ID).equalsIgnoreCase(resourceId));
}
@Test
@@ -946,7 +945,6 @@ public class BBInputSetupTest {
vg.setVolumeGroupName("volumeGroupName");
vg.setVolumeGroupId("volumeGroupId");
vnf.getVolumeGroups().add(vg);
- vnf.getVolumeGroups().add(vg);
serviceInstance.getVnfs().add(vnf);
Service service = mapper.readValue(
@@ -962,9 +960,10 @@ public class BBInputSetupTest {
aaiGenericVnf.setModelCustomizationId("vnfModelCustomizationUUID");
doReturn(aaiGenericVnf).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf.getVnfId());
+ lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, "volumeGroupId");
SPY_bbInputSetup.populateVolumeGroup(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
requestDetails.getRelatedInstanceList(), reqInfo.getInstanceName(), null, null);
- verify(SPY_bbInputSetup, times(2)).mapCatalogVolumeGroup(vg, modelInfo, service, "vnfModelCustomizationUUID");
+ verify(SPY_bbInputSetup, times(1)).mapCatalogVolumeGroup(vg, modelInfo, service, "vnfModelCustomizationUUID");
vnf.getVolumeGroups().clear();
SPY_bbInputSetup.populateVolumeGroup(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId,
requestDetails.getRelatedInstanceList(), reqInfo.getInstanceName(), null, null);
@@ -1023,14 +1022,14 @@ public class BBInputSetupTest {
SPY_bbInputSetup.populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance, lookupKeyMap,
resourceId, null);
- verify(SPY_bbInputSetup, times(2)).mapCatalogNetwork(network, modelInfo, service);
+ verify(SPY_bbInputSetup, times(1)).mapCatalogNetwork(network, modelInfo, service);
instanceName = "networkName2";
L3Network network2 = SPY_bbInputSetup.createNetwork(lookupKeyMap, instanceName, resourceId, null);
doReturn(network2).when(SPY_bbInputSetup).createNetwork(lookupKeyMap, instanceName, resourceId, null);
SPY_bbInputSetup.populateL3Network(instanceName, modelInfo, service, bbName, serviceInstance, lookupKeyMap,
resourceId, null);
- verify(SPY_bbInputSetup, times(1)).mapCatalogNetwork(network2, modelInfo, service);
+ verify(SPY_bbInputSetup, times(2)).mapCatalogNetwork(network2, modelInfo, service);
}
@Test
@@ -1148,8 +1147,15 @@ public class BBInputSetupTest {
String resourceId = "123";
doReturn(expectedPlatform).when(bbInputSetupMapperLayer).mapRequestPlatform(platform);
doReturn(expectedLineOfBusiness).when(bbInputSetupMapperLayer).mapRequestLineOfBusiness(lineOfBusiness);
+ org.onap.aai.domain.yang.GenericVnf vnfAAI = new org.onap.aai.domain.yang.GenericVnf();
+ vnfAAI.setModelCustomizationId("modelCustId");
+ doReturn(vnfAAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf.getVnfId());
doNothing().when(SPY_bbInputSetup).mapCatalogVnf(vnf, modelInfo, service);
- doReturn(null).when(SPY_bbInputSetupUtils).getAAIGenericVnf(any(String.class));
+ org.onap.aai.domain.yang.InstanceGroup instanceGroupAAI = new org.onap.aai.domain.yang.InstanceGroup();
+ doReturn(instanceGroupAAI).when(SPY_bbInputSetupUtils).getAAIInstanceGroup(any());
+ org.onap.so.db.catalog.beans.InstanceGroup catalogInstanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
+ doReturn(catalogInstanceGroup).when(SPY_bbInputSetupUtils).getCatalogInstanceGroup(any());
+
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
@@ -1157,7 +1163,7 @@ public class BBInputSetupTest {
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
- verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf, modelInfo, service);
+ verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf, modelInfo, service);
instanceName = "vnfName2";
GenericVnf vnf2 = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness,
@@ -1166,11 +1172,14 @@ public class BBInputSetupTest {
resourceId, vnfType, null);
doNothing().when(SPY_bbInputSetup).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
doNothing().when(SPY_bbInputSetup).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
+
+ lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "genericVnfId2");
+
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
- verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf2, modelInfo, service);
- verify(SPY_bbInputSetup, times(1)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
- verify(SPY_bbInputSetup, times(1)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
+ verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf2, modelInfo, service);
+ verify(SPY_bbInputSetup, times(2)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
+ verify(SPY_bbInputSetup, times(2)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
}
@Test
@@ -1202,7 +1211,14 @@ public class BBInputSetupTest {
String resourceId = "123";
doReturn(expectedPlatform).when(bbInputSetupMapperLayer).mapRequestPlatform(platform);
doReturn(expectedLineOfBusiness).when(bbInputSetupMapperLayer).mapRequestLineOfBusiness(lineOfBusiness);
+ org.onap.aai.domain.yang.GenericVnf vnfAAI = new org.onap.aai.domain.yang.GenericVnf();
+ vnfAAI.setModelCustomizationId("modelCustId");
+ doReturn(vnfAAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf.getVnfId());
doNothing().when(SPY_bbInputSetup).mapCatalogVnf(vnf, modelInfo, service);
+ org.onap.aai.domain.yang.InstanceGroup instanceGroupAAI = new org.onap.aai.domain.yang.InstanceGroup();
+ doReturn(instanceGroupAAI).when(SPY_bbInputSetupUtils).getAAIInstanceGroup(any());
+ org.onap.so.db.catalog.beans.InstanceGroup catalogInstanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
+ doReturn(catalogInstanceGroup).when(SPY_bbInputSetupUtils).getCatalogInstanceGroup(any());
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
@@ -1211,20 +1227,24 @@ public class BBInputSetupTest {
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
- verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf, modelInfo, service);
+ verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf, modelInfo, service);
instanceName = "vnfName2";
GenericVnf vnf2 = SPY_bbInputSetup.createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness,
resourceId, vnfType, null);
doReturn(vnf2).when(SPY_bbInputSetup).createGenericVnf(lookupKeyMap, instanceName, platform, lineOfBusiness,
resourceId, vnfType, null);
+ org.onap.aai.domain.yang.GenericVnf vnf2AAI = new org.onap.aai.domain.yang.GenericVnf();
+ vnfAAI.setModelCustomizationId("modelCustId2");
+ doReturn(vnf2AAI).when(SPY_bbInputSetupUtils).getAAIGenericVnf(vnf2.getVnfId());
+ doNothing().when(SPY_bbInputSetup).mapCatalogVnf(vnf2, modelInfo, service);
doNothing().when(SPY_bbInputSetup).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
doNothing().when(SPY_bbInputSetup).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
SPY_bbInputSetup.populateGenericVnf(modelInfo, instanceName, platform, lineOfBusiness, service, bbName,
serviceInstance, lookupKeyMap, requestDetails.getRelatedInstanceList(), resourceId, vnfType, null);
- verify(SPY_bbInputSetup, times(1)).mapCatalogVnf(vnf2, modelInfo, service);
- verify(SPY_bbInputSetup, times(1)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
- verify(SPY_bbInputSetup, times(1)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
+ verify(SPY_bbInputSetup, times(2)).mapCatalogVnf(vnf2, modelInfo, service);
+ verify(SPY_bbInputSetup, times(2)).mapNetworkCollectionInstanceGroup(vnf2, "{instanceGroupId}");
+ verify(SPY_bbInputSetup, times(2)).mapVnfcCollectionInstanceGroup(vnf2, modelInfo, service);
}
@Test
@@ -1459,14 +1479,20 @@ public class BBInputSetupTest {
new AAICommonObjectMapperProvider().getMapper().writeValueAsString(aaiCollection)));
Collection collection = new Collection();
+ ModelInfoCollection modelInfoCollection = new ModelInfoCollection();
List<InstanceGroup> instanceGroupsList = new ArrayList<>();
InstanceGroup instanceGroup = new InstanceGroup();
instanceGroupsList.add(instanceGroup);
-
+ NetworkCollectionResourceCustomization networkCollectionCust = Mockito.mock(NetworkCollectionResourceCustomization.class);
+ CollectionResource collectionResource = new CollectionResource();
doReturn(collection).when(bbInputSetupMapperLayer)
.mapAAICollectionIntoCollection(isA(org.onap.aai.domain.yang.Collection.class));
doReturn(instanceGroup).when(SPY_bbInputSetup).mapInstanceGroup(isA(AAIResultWrapper.class));
doReturn(instanceGroupsList).when(SPY_bbInputSetup).mapInstanceGroups(any());
+ doReturn(networkCollectionCust).when(SPY_bbInputSetupUtils).getCatalogNetworkCollectionResourceCustByID(aaiCollection.getCollectionCustomizationId());
+ doReturn(collectionResource).when(networkCollectionCust).getCollectionResource();
+ doReturn(modelInfoCollection).when(bbInputSetupMapperLayer).mapCatalogCollectionToCollection(networkCollectionCust, collectionResource);
+
SPY_bbInputSetup.mapCollection(collections, serviceInstance);
assertEquals(collection, serviceInstance.getCollection());
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
index d576242318..aa883b67a2 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
@@ -736,7 +736,7 @@ public class BBInputSetupUtilsTest {
volumeGroup.setVolumeGroupName("name123");
expected.get().getVolumeGroup().add(volumeGroup);
doReturn(expected).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class), any(AAIResourceUri.class));
- Optional<VolumeGroup> actual = this.bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123", "name123");
+ Optional<VolumeGroup> actual = this.bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123", "id123", "name123");
assertEquals(actual.get().getVolumeGroupId(), expected.get().getVolumeGroup().get(0).getVolumeGroupId());
}
@@ -745,6 +745,7 @@ public class BBInputSetupUtilsTest {
expectedException.expect(Exception.class);
String vnfId = "vnfId";
+ String volumeGroupId = "volumeGroupId";
String volumeGroupName = "volumeGroupName";
VolumeGroup volumeGroup = new VolumeGroup();
@@ -757,18 +758,19 @@ public class BBInputSetupUtilsTest {
doReturn(expectedVolumeGroup).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class), any(AAIResourceUri.class));
- bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnfId, volumeGroupName);
+ bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnfId, volumeGroupId, volumeGroupName);
}
@Test
public void getRelatedVolumeGroupByNameFromVfModuleNotFoundTest() throws Exception {
String vnfId = "vnfId";
+ String volumeGroupId = "volumeGroupId";
String volumeGroupName = "volumeGroupName";
doReturn(Optional.empty()).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class), any(AAIResourceUri.class));
- Optional<VolumeGroup> actualVolumeGroup = bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnfId, volumeGroupName);
+ Optional<VolumeGroup> actualVolumeGroup = bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnfId, volumeGroupId, volumeGroupName);
assertEquals(actualVolumeGroup, Optional.empty());
}
-}
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResource.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResource.json
index a500e0ba88..4a72cde73a 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResource.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResource.json
@@ -1,5 +1,5 @@
{
- "modelUUID":null,
+ "modelUUID":"modelVersionId",
"modelName":null,
"modelInvariantUUID":"modelInvariantUUID",
"modelVersion":null,
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResourceCustomization.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResourceCustomization.json
index d87875da81..fc2ade75fb 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResourceCustomization.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/CollectionResourceCustomization.json
@@ -1,5 +1,5 @@
{
- "modelCustomizationUUID":null,
+ "modelCustomizationUUID":"modelCustomizationUUID",
"modelInstanceName":null,
"type":"type",
"role":"role",
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json
index 0d00e4d007..e4c8a8f59b 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json
@@ -12,7 +12,9 @@
"heat-stack-id":"heatStackId",
"contrail-service-instance-fqdn":"contrailServiceInstanceFqdn",
"module-index":1,"selflink":"selflink",
- "model-info-vf-module":null
+ "model-info-vf-module": {
+ "is-base-boolean":false
+ }
}],
"volume-groups":[],
"line-of-business":null,
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json
index 45ca00bd32..a7e2ade10b 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json
@@ -1,4 +1,6 @@
{
+ "model-customization-uuid":"modelCustomizationUUID",
+ "model-version-id":"modelVersionId",
"model-invariant-uuid":"modelInvariantUUID",
"collection-function":"function",
"collection-role":"role",
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
deleted file mode 100644
index 7c879879ef..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>testReVer123</resource-version>
- <relationship-list>
- <relationship>
- <related-to>nothing</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
deleted file mode 100644
index 0b5a822b68..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- <generic-vnf>
- <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
- <vnf-name>ZRDM1MMSC03</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
deleted file mode 100644
index 0b5a822b68..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- <generic-vnf>
- <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
- <vnf-name>ZRDM1MMSC03</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
deleted file mode 100644
index d0fccd80c9..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
+++ /dev/null
@@ -1,6 +0,0 @@
- <search-results xmlns="http://com.aai.inventory">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
deleted file mode 100644
index d0fccd80c9..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
+++ /dev/null
@@ -1,6 +0,0 @@
- <search-results xmlns="http://com.aai.inventory">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml
deleted file mode 100644
index fce47fcd0d..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<search-results xmlns="http://org.openecomp.aai.inventory/v11">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>/aai/v11/business/customers/customer/AbcBank/service-subscriptions/service-subscription/ABC-ST/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>/aai/v11/business/customers/customer/XyCorporation/service-subscriptions/service-subscription/XY-ST/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
-</search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
deleted file mode 100644
index e377c70474..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<service-instance>
- <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
- <resource-version>123456789</resource-version>
- <relationship-list>
- <relationship>
- <related-to>cvlan-tag</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
- <relationship-data>
- <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
- <relationship-value>2003</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>port-group.interface-id</relationship-key>
- <relationship-value>slcp1447vbc.ipag</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vce</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </service-instance> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
deleted file mode 100644
index 52e75d970a..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<service-subscription xmlns="http://com.aai.inventory">
- <service-type>SDN-ETHERNET-INTERNET</service-type>
- <resource-version>1234</resource-version>
- <service-instance>
- <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
- <resource-version>123456789</resource-version>
- <relationship-list>
- <relationship>
- <related-to>cvlan-tag</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
- <relationship-data>
- <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
- <relationship-value>2003</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>port-group.interface-id</relationship-key>
- <relationship-value>slcp1447vbc.ipag</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vce</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </service-instance>
- </service-subscription> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
deleted file mode 100644
index b55d51971d..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<vce xmlns="http://com.aai.inventory">
- <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
- <vnf-type>esx-vce</vnf-type>
- <prov-status>NVTPROV</prov-status>
- <orchestration-status>created</orchestration-status>
- <resource-version>0000020</resource-version>
- <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
- <mso-catalog-key/>
- <vpe-id>VPESAT-mtanjrsv126</vpe-id>
- <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
- <port-groups>
- <port-group>
- <interface-id>slcp1476vbc.vpe</interface-id>
- <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
- <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
- <interface-role>Internet</interface-role>
- <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
- <resource-version>0000020</resource-version>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>3012</cvlan-tag>
- <resource-version>0000020</resource-version>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- <port-group>
- <interface-id>slcp1476vbc.ipag</interface-id>
- <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
- <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
- <interface-role>Customer</interface-role>
- <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <resource-version>0000020</resource-version>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>2003</cvlan-tag>
- <resource-version>0000020</resource-version>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- </port-groups>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>011216-1602-SDNC001</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vserver</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
- <relationship-data>
- <relationship-key>vserver.vserver-id</relationship-key>
- <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>complex</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
- <relationship-data>
- <relationship-key>complex.physical-location-id</relationship-key>
- <relationship-value>MDTWNJ21A4</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>availability-zone</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
- <relationship-data>
- <relationship-key>availability-zone.availability-zone-name</relationship-key>
- <relationship-value>slcp1-esx-az01</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
deleted file mode 100644
index e5f98bfe33..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<vce xmlns="http://com.aai.inventory">
- <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
- <vnf-type>esx-vce</vnf-type>
- <prov-status>NVTPROV</prov-status>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
- <mso-catalog-key/>
- <vpe-id>VPESAT-mtanjrsv126</vpe-id>
- <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
- <port-groups>
- <port-group>
- <interface-id>slcp1476vbc.vpe</interface-id>
- <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
- <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
- <interface-role>Internet</interface-role>
- <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>3012</cvlan-tag>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- <port-group>
- <interface-id>slcp1476vbc.ipag</interface-id>
- <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
- <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
- <interface-role>Customer</interface-role>
- <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>2003</cvlan-tag>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- </port-groups>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>011216-1602-SDNC001</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vserver</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
- <relationship-data>
- <relationship-key>vserver.vserver-id</relationship-key>
- <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>complex</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
- <relationship-data>
- <relationship-key>complex.physical-location-id</relationship-key>
- <relationship-value>MDTWNJ21A4</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>availability-zone</related-to>
- <related-link>https://aai-ext1.test..com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
- <relationship-data>
- <relationship-key>availability-zone.availability-zone-name</relationship-key>
- <relationship-value>slcp1-esx-az01</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml
deleted file mode 100644
index eedbda9343..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Content-Length" value="0"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
-</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
deleted file mode 100644
index 66ed8f5758..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Fault>
-<requestError>
-<serviceException>
-<messageId>SVC3002</messageId>
-<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
-<variables>
-<variable>PUTcustomer</variable>
-<variable>SubName01</variable>
-<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
-<variable>ERR.5.4.5105</variable>
-</variables>
-</serviceException>
-</requestError>
-</Fault> \ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index 57bfb4ed30..151ba2c3aa 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -135,12 +135,6 @@
<version>2.3.0</version>
</dependency>
<dependency>
- <groupId>org.camunda.bpm.extension</groupId>
- <artifactId>camunda-bpm-assert</artifactId>
- <version>2.0-alpha2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>2.3.0</version>
@@ -202,5 +196,10 @@
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.0.5</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>so-bpmn-tasks</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy b/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy
deleted file mode 100644
index bb58030683..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy
+++ /dev/null
@@ -1,425 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - 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.onap.so.bpmn.infrastructure.scripts
-
-import org.json.JSONObject
-import org.json.XML;
-
-import static org.apache.commons.lang3.StringUtils.*;
-import groovy.xml.XmlUtil
-import groovy.json.*
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.recipe.ResourceInput;
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
-import org.onap.so.rest.APIResponse
-import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
-import java.util.UUID;
-
-import org.camunda.bpm.engine.runtime.Execution
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils
-import org.onap.so.rest.RESTClient
-import org.onap.so.rest.RESTConfig
-
-/**
- * This groovy class supports the <class>CreateActivateSDNCResource.bpmn</class> process.
- * flow for SDNC Network Resource Create
- */
-public class CreateActivateSDNCResource extends AbstractServiceTaskProcessor {
-
- String Prefix="CRESDNCRES_"
-
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- JsonUtils jsonUtil = new JsonUtils()
-
- SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
-
- public void preProcessRequest(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started preProcessRequest *****", isDebugEnabled)
- try {
-
- //get bpmn inputs from resource request.
- String requestId = execution.getVariable("mso-request-id")
- String requestAction = execution.getVariable("requestAction")
- utils.log("INFO","The requestAction is: " + requestAction, isDebugEnabled)
- String recipeParamsFromRequest = execution.getVariable("recipeParams")
- utils.log("INFO","The recipeParams is: " + recipeParamsFromRequest, isDebugEnabled)
- String resourceInput = execution.getVariable("resourceInput")
- utils.log("INFO","The resourceInput is: " + resourceInput, isDebugEnabled)
- //Get ResourceInput Object
- ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
- execution.setVariable(Prefix + "resourceInput", resourceInputObj)
-
- //Deal with recipeParams
- String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
- String resourceName = resourceInputObj.getResourceInstanceName()
- //For sdnc requestAction default is "createNetworkInstance"
- String operationType = "Network"
- String apiType = "network"
- if(!StringUtils.isBlank(recipeParamsFromRequest)){
- //the operationType from worflow(first node) is second priority.
- operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
- apiType = jsonUtil.getJsonValue(recipeParamsFromRequest, "apiType")
- }
- if(!StringUtils.isBlank(recipeParamsFromWf)){
- //the operationType from worflow(first node) is highest priority.
- operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
- apiType = jsonUtil.getJsonValue(recipeParamsFromRequest, "apiType")
- }
-
- execution.setVariable(Prefix + "operationType", operationType)
- execution.setVariable(Prefix + "apiType", apiType)
- execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
- execution.setVariable("mso-request-id", requestId)
- execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
- //TODO Here build networkrequest
-
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex){
- String msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- }
-
- String customizeResourceParam(String netowrkInputParametersJson) {
- List<Map<String, Object>> paramList = new ArrayList();
- JSONObject jsonObject = new JSONObject(netowrkInputParametersJson);
- Iterator iterator = jsonObject.keys();
- while (iterator.hasNext()) {
- String key = iterator.next();
- HashMap<String, String> hashMap = new HashMap();
- hashMap.put("name", key);
- hashMap.put("value", jsonObject.get(key))
- paramList.add(hashMap)
- }
- Map<String, List<Map<String, Object>>> paramMap = new HashMap();
- paramMap.put("param", paramList);
-
- return new JSONObject(paramMap).toString();
- }
-
- public void prepareSDNCRequest (DelegateExecution execution) {
- String svcAction = "create"
- prepareSDNCRequestReq(execution, svcAction, "")
- }
-
-
- public void prepareSDNCActivateRequest (DelegateExecution execution) {
- String svcAction = "activate"
- String sndcResourceId = execution.getVariable(Prefix + "sdncResourceId")
- prepareSDNCRequestReq(execution, svcAction, sndcResourceId)
- }
- /**
- * Pre Process the BPMN Flow Request
- * Inclouds:
- * generate the nsOperationKey
- * generate the nsParameters
- */
- public void prepareSDNCRequestReq (DelegateExecution execution, String svcAction, String sdncResourceId) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled)
-
- try {
- // get variables
- String operationType = execution.getVariable(Prefix + "operationType")
- String sdnc_apiType = execution.getVariable(Prefix + "apiType")
- String sdnc_svcAction = svcAction
- String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
-
- String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
- String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
-
- String hdrRequestId = execution.getVariable("mso-request-id")
- String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
- String source = execution.getVariable("source")
- String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
- String serviceType = resourceInputObj.getServiceType()
- String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
- String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
- String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
- String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
- String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
- String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
- String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
- String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
- String modelName = resourceInputObj.getResourceModelInfo().getModelName()
- String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
- String resourceInputPrameters = resourceInputObj.getResourceParameters()
- String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
- //here convert json string to xml string
- String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(netowrkInputParametersJson)))
-
- // 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyCreateRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1"
- xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
- <sdncadapter:RequestHeader>
- <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
- <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
- <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>
- <sdncadapter:SvcOperation>${sdnc_apiType}-topology-operation</sdncadapter:SvcOperation>
- <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
- <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
- </sdncadapter:RequestHeader>
- <sdncadapterworkflow:SDNCRequestData>
- <request-information>
- <request-id>${hdrRequestId}</request-id>
- <request-action>${sdnc_requestAction}</request-action>
- <source>${source}</source>
- <notification-url></notification-url>
- <order-number></order-number>
- <order-version></order-version>
- </request-information>
- <service-information>
- <service-id>${serviceInstanceId}</service-id>
- <subscription-service-type>${serviceType}</subscription-service-type>
- <onap-model-information>
- <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
- <model-uuid>${serviceModelUuid}</model-uuid>
- <model-version>${serviceModelVersion}</model-version>
- <model-name>${serviceModelName}</model-name>
- </onap-model-information>
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- <global-customer-id>${globalCustomerId}</global-customer-id>
- </service-information>
- <${sdnc_apiType}-information>
- <${sdnc_apiType}-id>${sdncResourceId}</${sdnc_apiType}-id>
- <onap-model-information>
- <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
- <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
- <model-uuid>${modelUuid}</model-uuid>
- <model-version>${modelVersion}</model-version>
- <model-name>${modelName}</model-name>
- </onap-model-information>
- </${sdnc_apiType}-information>
- <${sdnc_apiType}-request-input>
- <${sdnc_apiType}-input-parameters>${netowrkInputParameters}</${sdnc_apiType}-input-parameters>
- </${sdnc_apiType}-request-input>
- </sdncadapterworkflow:SDNCRequestData>
- </aetgt:SDNCAdapterWorkflowRequest>""".trim()
-
- String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
- utils.logAudit(sndcTopologyCreateRequesAsString)
- execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
- utils.log("INFO","sdncAdapterWorkflowRequest :" + sndcTopologyCreateRequesAsString, isDebugEnabled)
- utils.log("DEBUG","sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyCreateRequesAsString, isDebugEnabled)
-
- } catch (Exception ex) {
- String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
- }
- utils.log("INFO"," ***** Exit prepareSDNCRequest *****", isDebugEnabled)
- }
-
- private void setProgressUpdateVariables(DelegateExecution execution, String body) {
- def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
- execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
- execution.setVariable("CVFMI_updateResOperStatusRequest", body)
- }
-
- public void prepareUpdateBeforeCreateSDNCResource(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareUpdateBeforeCreateSDNCResource *****", isDebugEnabled)
-
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
- String operType = resourceInputObj.getOperationType()
- String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
- String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
- String operationId = resourceInputObj.getOperationId()
- String modelName = resourceInputObj.getResourceModelInfo().getModelName()
- String progress = "20"
- String status = "processing"
- String statusDescription = "Create " + modelName
-
- execution.getVariable("operationId")
-
- String body = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateResourceOperationStatus>
- <operType>${operType}</operType>
- <operationId>${operationId}</operationId>
- <progress>${progress}</progress>
- <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
- <serviceId>${ServiceInstanceId}</serviceId>
- <status>${status}</status>
- <statusDescription>${statusDescription}</statusDescription>
- </ns:updateResourceOperationStatus>
- </soapenv:Body>
- </soapenv:Envelope>""";
-
- setProgressUpdateVariables(execution, body)
- utils.log("INFO"," ***** End prepareUpdateBeforeCreateSDNCResource *****", isDebugEnabled)
- }
-
- public void postCreateSDNC(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- ServicePluginFactory.getInstance().test()
- utils.log("INFO"," ***** Started postCreateSDNC *****", isDebugEnabled)
- String sdnc_apiType = execution.getVariable(Prefix + "apiType")
- String sdncAdapterResponse = execution.getVariable("sdncAdapterResponse")
- utils.log("INFO","sdncAdapterResponse for create:" + sdncAdapterResponse , isDebugEnabled)
- sdncAdapterResponse = sdncAdapterResponse.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
- sdncAdapterResponse = sdncAdapterResponse.replaceAll('tag0:', '').replaceAll(':tag0', '')
- utils.log("INFO","sdncAdapterResponse for create after replace:" + sdncAdapterResponse , isDebugEnabled)
- //if it is vnf we need to query the vnf-id,if it is network , we need to query the network-id
- String sdncRespData = utils.getNodeText1(sdncAdapterResponse, "RequestData")
- utils.log("INFO","sdncRespData:" + sdncRespData , isDebugEnabled)
- String objectKey = "/" + sdnc_apiType + "/"
- String objectDataKey = "/" + sdnc_apiType + "-data/"
- String objectPath = utils.getNodeText1(sdncRespData, "object-path")
-
- String resourceObjId = objectPath.substring(objectPath.indexOf(objectKey) + objectKey.length(), objectPath.indexOf(objectDataKey))
- utils.log("INFO", "resourceObjId:" + resourceObjId, isDebugEnabled)
- execution.setVariable(Prefix + "sdncResourceId", resourceObjId)
-
- utils.log("INFO"," ***** End postCreateSDNC *****", isDebugEnabled)
-
- }
-
- public void postActivateSDNC(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started postActivateSDNC *****", isDebugEnabled)
- String sdncAdapterResponse = execution.getVariable("sdncAdapterResponse")
- utils.log("INFO","sdncAdapterResponse for activate:" + sdncAdapterResponse , isDebugEnabled)
- utils.log("INFO"," ***** End postActivateSDNC *****", isDebugEnabled)
- }
-
- public void prepareUpdateAfterCreateSDNCResource(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareUpdateAfterCreateSDNCResource *****", isDebugEnabled)
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
- String operType = resourceInputObj.getOperationType()
- String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
- String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
- String modelName = resourceInputObj.getResourceModelInfo().getModelName()
- String operationId = resourceInputObj.getOperationId()
- String progress = "50"
- String status = "processing"
- String statusDescription = "Instantiate " + modelName
-
- execution.getVariable("operationId")
-
- String body = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateResourceOperationStatus>
- <operType>${operType}</operType>
- <operationId>${operationId}</operationId>
- <progress>${progress}</progress>
- <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
- <serviceId>${ServiceInstanceId}</serviceId>
- <status>${status}</status>
- <statusDescription>${statusDescription}</statusDescription>
- </ns:updateResourceOperationStatus>
- </soapenv:Body>
- </soapenv:Envelope>""";
-
- setProgressUpdateVariables(execution, body)
- utils.log("INFO"," ***** End prepareUpdateAfterCreateSDNCResource *****", isDebugEnabled)
- }
-
- public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareUpdateAfterActivateSDNCResource *****", isDebugEnabled)
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
- String operType = resourceInputObj.getOperationType()
- String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
- String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
- String modelName = resourceInputObj.getResourceModelInfo().getModelName()
- String operationId = resourceInputObj.getOperationId()
- String progress = "100"
- String status = "finished"
- String statusDescription = "Instantiate " + modelName + " finished"
-
- execution.getVariable("operationId")
-
- String body = """
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ns="http://org.openecomp.mso/requestsdb">
- <soapenv:Header/>
- <soapenv:Body>
- <ns:updateResourceOperationStatus>
- <operType>${operType}</operType>
- <operationId>${operationId}</operationId>
- <progress>${progress}</progress>
- <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
- <serviceId>${ServiceInstanceId}</serviceId>
- <status>${status}</status>
- <statusDescription>${statusDescription}</statusDescription>
- </ns:updateResourceOperationStatus>
- </soapenv:Body>
- </soapenv:Envelope>""";
-
- setProgressUpdateVariables(execution, body)
- utils.log("INFO"," ***** End prepareUpdateAfterActivateSDNCResource *****", isDebugEnabled)
- }
-
- public void postCreateSDNCCall(DelegateExecution execution){
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareSDNCRequest *****", isDebugEnabled)
- String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
- String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
-
- utils.log("INFO","response from sdnc, response code :" + responseCode + " response object :" + responseObj, isDebugEnabled)
- utils.log("INFO"," ***** Exit prepareSDNCRequest *****", isDebugEnabled)
- }
-
- public void sendSyncResponse (DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
-
- try {
- String operationStatus = "finished"
- // RESTResponse for main flow
- String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
- sendWorkflowResponse(execution, 202, resourceOperationResp)
- execution.setVariable("sentSyncResponse", true)
-
- } catch (Exception ex) {
- String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
- }
-}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
deleted file mode 100644
index 38d05fe28e..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
- */
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.common;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceSubscription;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_500;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_500;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.onap.so.BaseIntegrationTest;
-
-
-/**
- * Unit Test for the GenericGetService Sub Flow
- */
-
-public class GenericGetServiceIT extends BaseIntegrationTest {
-
-
- @Test
- public void testGenericGetService_success_serviceInstance() throws Exception{
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
- String processId = invokeSubProcess( "GenericGetService", variables);
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
-
- @Test
-
- public void testGenericGetService_success_serviceSubscription() throws Exception{
-
- MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byName() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byId() throws Exception{
-
- MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_404Response() throws Exception{
-
- MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceSubscription404() throws Exception{
- MockGetServiceSubscription("SDN-ETHERNET-INTERNET", "1604-MVM-26", 404);
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByName404() throws Exception{
-
- MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "", "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("404", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceById404() throws Exception{
-
- MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("404", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceEmptyResponse() throws Exception{
-
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "", "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByIdEmpty() throws Exception{
-
- MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
-
- @Test
-
- public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.,workStep=*]";
-
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getSIBadResponse() throws Exception{
-
- MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getUrlByIdBadResponse() throws Exception{
-
- MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("500", siUrlResponseCode);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getUrlByNameBadResponse() throws Exception{
-
- MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("500", siUrlResponseCode);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byNameServicePresent() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
- MockGetServiceInstance("AbcBank", "ABC-ST", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertNotNull(resourceLink);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byNameServiceNotPresent() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
- MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals(null, resourceLink);
- assertEquals(" ", response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- private void setVariablesInstance(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
- variables.put("isDebugLogEnabled", "true");
- variables.put("GENGS_serviceInstanceId", siId);
- variables.put("GENGS_serviceInstanceName", siName);
- variables.put("GENGS_globalCustomerId",globalCustId);
- variables.put("GENGS_serviceType", serviceType);
- variables.put("GENGS_type", "service-instance");
- variables.put("mso-request-id", UUID.randomUUID().toString());
- }
-
- private void setVariablesSubscription(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
- variables.put("isDebugLogEnabled", "true");
- variables.put("GENGS_serviceInstanceId", siId);
- variables.put("GENGS_serviceInstanceName", siName);
- variables.put("GENGS_globalCustomerId",globalCustId);
- variables.put("GENGS_serviceType", serviceType);
- variables.put("GENGS_type", "service-subscription");
- variables.put("mso-request-id", UUID.randomUUID().toString());
- }
-
-
-}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
index 7c4c8201ea..b514c38d47 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
@@ -30,25 +30,23 @@ import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableName
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.history.HistoricVariableInstance;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.ProcessEngineRule;
import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl;
+import org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml")
-@Ignore
public class CreateAndActivatePnfResourceTest {
private static final String TIMEOUT_10_S = "PT10S";
@@ -62,6 +60,9 @@ public class CreateAndActivatePnfResourceTest {
@Autowired
private AaiConnectionTestImpl aaiConnection;
+ @Autowired
+ private DmaapClientTestImpl dmaapClientTestImpl;
+
@Test
@Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
public void shouldSaveCurrentIpToVariableIfItAlreadyExistsInAai() throws Exception {
@@ -97,9 +98,8 @@ public class CreateAndActivatePnfResourceTest {
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
- runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey("businessKey")
- .correlateWithResult();
+ dmaapClientTestImpl.sendMessage();
+
// then
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
@@ -126,9 +126,8 @@ public class CreateAndActivatePnfResourceTest {
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
- runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey("businessKey")
- .correlateWithResult();
+ dmaapClientTestImpl.sendMessage();
+
// then
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/resources/applicationContext_forPnfTesting.xml b/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
index 72462bd092..72462bd092 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/resources/applicationContext_forPnfTesting.xml
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml
index cc6e19d446..a8a6441740 100644
--- a/bpmn/so-bpmn-building-blocks/pom.xml
+++ b/bpmn/so-bpmn-building-blocks/pom.xml
@@ -9,7 +9,6 @@
<artifactId>so-bpmn-building-blocks</artifactId>
<packaging>jar</packaging>
<properties>
- <jax.ws.rs>2.0.1</jax.ws.rs>
<httpclient.version>3.1</httpclient.version>
<camunda.bpm.assert.version>1.2</camunda.bpm.assert.version>
<h2.version>1.4.196</h2.version>
@@ -142,11 +141,6 @@
<version>3.4</version>
</dependency>
<dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
index 7691498bd0..abc017c957 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?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:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
<bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true">
<bpmn:startEvent id="CreateVfModuleBB_Start" name="Start">
<bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
@@ -23,21 +23,27 @@
<bpmn:outgoing>SequenceFlow_1s4rpyp</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_16g4dz0" sourceRef="CreateVfModule" targetRef="VnfAdapter" />
- <bpmn:sequenceFlow id="SequenceFlow_0ecr393" sourceRef="VnfAdapter" targetRef="UpdateVfModuleStatus" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ecr393" sourceRef="VnfAdapter" targetRef="UpdateVfModuleHeatStackId" />
<bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter">
<bpmn:extensionElements>
<camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
<camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" />
+ <camunda:in source="VNFREST_Request" target="VNFREST_Request" />
+ <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_16g4dz0</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ecr393</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_1stomxq" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" />
<bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VfModule Ostatus to Created (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0qqsilv</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1stomxq</bpmn:outgoing>
</bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0qqsilv" sourceRef="UpdateVfModuleHeatStackId" targetRef="UpdateVfModuleStatus" />
+ <bpmn:serviceTask id="UpdateVfModuleHeatStackId" name="Update VfModule HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0qqsilv</bpmn:outgoing>
+ </bpmn:serviceTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB">
@@ -58,9 +64,9 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="CreateVfModuleBB_End">
- <dc:Bounds x="1259" y="-3" width="36" height="36" />
+ <dc:Bounds x="1391" y="-3" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1267" y="37" width="19" height="12" />
+ <dc:Bounds x="1399" y="37" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="CreateVfModule">
@@ -92,23 +98,33 @@
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ecr393_di" bpmnElement="SequenceFlow_0ecr393">
<di:waypoint xsi:type="dc:Point" x="990" y="15" />
- <di:waypoint xsi:type="dc:Point" x="1065" y="15" />
+ <di:waypoint xsi:type="dc:Point" x="1063" y="15" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1028" y="0" width="0" height="0" />
+ <dc:Bounds x="1027" y="0" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1i1pfzb_di" bpmnElement="VnfAdapter">
<dc:Bounds x="890" y="-25" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1stomxq_di" bpmnElement="SequenceFlow_1stomxq">
- <di:waypoint xsi:type="dc:Point" x="1165" y="15" />
- <di:waypoint xsi:type="dc:Point" x="1259" y="15" />
+ <di:waypoint xsi:type="dc:Point" x="1327" y="15" />
+ <di:waypoint xsi:type="dc:Point" x="1391" y="15" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1212" y="0" width="0" height="0" />
+ <dc:Bounds x="1359" y="0" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0fpfn71_di" bpmnElement="UpdateVfModuleStatus">
- <dc:Bounds x="1065" y="-25" width="100" height="80" />
+ <dc:Bounds x="1227" y="-25" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qqsilv_di" bpmnElement="SequenceFlow_0qqsilv">
+ <di:waypoint xsi:type="dc:Point" x="1163" y="15" />
+ <di:waypoint xsi:type="dc:Point" x="1227" y="15" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1195" y="0" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_04k1b85_di" bpmnElement="UpdateVfModuleHeatStackId">
+ <dc:Bounds x="1063" y="-25" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn
index 58a429dcc5..a95dc9ce73 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
<bpmn:process id="CreateVolumeGroupBB" name="CreateVolumeGroupBB" isExecutable="true">
<bpmn:startEvent id="CreateVolumeGroupBB_Start" name="Start">
<bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing>
@@ -14,7 +14,7 @@
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0kfkpbh" sourceRef="CreateVolumeGroupVnfAdapter" targetRef="Vnf_Adapter" />
<bpmn:serviceTask id="UpdateVolumeGroupAAI" name="UpdateVolumeGroupAAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_06flg6h</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1d5nux2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="CreateVolumeGroupBB_End" />
@@ -28,11 +28,17 @@
<camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="VNFREST_Request" target="VNFREST_Request" />
+ <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_06flg6h</bpmn:outgoing>
</bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_06flg6h" sourceRef="Vnf_Adapter" targetRef="UpdateVolumeGroupAAI" />
+ <bpmn:sequenceFlow id="SequenceFlow_06flg6h" sourceRef="Vnf_Adapter" targetRef="UpdateVolumeGroupHeatStackId" />
+ <bpmn:sequenceFlow id="SequenceFlow_1d5nux2" sourceRef="UpdateVolumeGroupHeatStackId" targetRef="UpdateVolumeGroupAAI" />
+ <bpmn:serviceTask id="UpdateVolumeGroupHeatStackId" name="Update VolumeGroup HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVolumeGroup(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_06flg6h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1d5nux2</bpmn:outgoing>
+ </bpmn:serviceTask>
</bpmn:process>
<bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" />
<bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" />
@@ -52,9 +58,9 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="CreateVolumeGroupBB_End">
- <dc:Bounds x="928" y="102" width="36" height="36" />
+ <dc:Bounds x="1063" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="901" y="142" width="90" height="12" />
+ <dc:Bounds x="1081" y="142" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_01zmebl_di" bpmnElement="CreateVolumeGroupVnfAdapter">
@@ -68,13 +74,13 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="UpdateVolumeGroupAAI">
- <dc:Bounds x="776" y="80" width="100" height="80" />
+ <dc:Bounds x="929" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h">
- <di:waypoint xsi:type="dc:Point" x="876" y="120" />
- <di:waypoint xsi:type="dc:Point" x="928" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1029" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="1063" y="120" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="857" y="98.5" width="90" height="13" />
+ <dc:Bounds x="1046" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1wythmn_di" bpmnElement="QueryVfModuleSDNC">
@@ -92,11 +98,21 @@
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_06flg6h_di" bpmnElement="SequenceFlow_06flg6h">
<di:waypoint xsi:type="dc:Point" x="729" y="120" />
- <di:waypoint xsi:type="dc:Point" x="776" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="120" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="752.5" y="99" width="0" height="12" />
+ <dc:Bounds x="752" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1d5nux2_di" bpmnElement="SequenceFlow_1d5nux2">
+ <di:waypoint xsi:type="dc:Point" x="874" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="929" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="902" y="105" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0m035ns_di" bpmnElement="UpdateVolumeGroupHeatStackId">
+ <dc:Bounds x="774" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
index 408e378bcf..07d0b18938 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?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:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
<bpmn:process id="DeleteVfModuleBB" name="Start" isExecutable="true">
<bpmn:startEvent id="DeleteVfModuleBB_Start" name="Start">
<bpmn:outgoing>SequenceFlow_1537yw5</bpmn:outgoing>
@@ -23,6 +23,8 @@
<camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" />
+ <camunda:in source="VNFREST_Request" target="VNFREST_Request" />
+ <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_08tvhtf</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_02lpx87</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn
index bd6b124175..212e735dd1 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn
@@ -11,18 +11,13 @@
<bpmn:endEvent id="End_UnassignNetworkBB" name="end">
<bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_GetL3NetworkById" />
+ <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_VfModuleRelatioship" />
<bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="End_UnassignNetworkBB" />
<bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf &#39;vf-module&#39; relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), &#34;vf-module&#34;)}">
- <bpmn:incoming>SequenceFlow_1gd5h4c</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" />
- <bpmn:sequenceFlow id="SequenceFlow_1gd5h4c" sourceRef="Task_GetL3NetworkById" targetRef="Task_VfModuleRelatioship" />
- <bpmn:serviceTask id="Task_GetL3NetworkById" name="Get L3Network by networkId (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1gd5h4c</bpmn:outgoing>
- </bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" />
<bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming>
@@ -32,9 +27,9 @@
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetwork1802BB">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB">
- <dc:Bounds x="145" y="119" width="36" height="36" />
+ <dc:Bounds x="288" y="119" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="152" y="155" width="22" height="12" />
+ <dc:Bounds x="295" y="155" width="22" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign">
@@ -47,10 +42,10 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2">
- <di:waypoint xsi:type="dc:Point" x="181" y="137" />
- <di:waypoint xsi:type="dc:Point" x="232" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="324" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="375" y="137" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="207" y="122" width="0" height="0" />
+ <dc:Bounds x="304.5" y="122" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt">
@@ -70,16 +65,6 @@
<dc:Bounds x="500" y="122" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1gd5h4c_di" bpmnElement="SequenceFlow_1gd5h4c">
- <di:waypoint xsi:type="dc:Point" x="332" y="137" />
- <di:waypoint xsi:type="dc:Point" x="375" y="137" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="354" y="122" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_1scptd7_di" bpmnElement="Task_GetL3NetworkById">
- <dc:Bounds x="232" y="97" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj">
<di:waypoint xsi:type="dc:Point" x="624" y="137" />
<di:waypoint xsi:type="dc:Point" x="665" y="137" />
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java
index a3c6a820bd..a94a4bb89a 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java
@@ -42,6 +42,7 @@ public class CreateVfModuleBBTest extends BaseBPMNTest{
"QueryVfModule",
"CreateVfModule",
"VnfAdapter",
+ "UpdateVfModuleHeatStackId",
"UpdateVfModuleStatus",
"CreateVfModuleBB_End");
assertThat(pi).isEnded();
@@ -54,7 +55,7 @@ public class CreateVfModuleBBTest extends BaseBPMNTest{
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
.hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf")
- .hasNotPassed("QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
+ .hasNotPassed("QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
assertThat(pi).isEnded();
}
@@ -65,7 +66,7 @@ public class CreateVfModuleBBTest extends BaseBPMNTest{
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
.hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule")
- .hasNotPassed("CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
+ .hasNotPassed("CreateVfModule", "VnfAdapter", "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
assertThat(pi).isEnded();
}
@@ -76,18 +77,32 @@ public class CreateVfModuleBBTest extends BaseBPMNTest{
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
.hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule")
- .hasNotPassed("VnfAdapter", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
+ .hasNotPassed("VnfAdapter", "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
assertThat(pi).isEnded();
}
@Test
+ public void rainyDayCreateVfModuleUpdateVfModuleHeatStackIdError_Test() throws Exception {
+ mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
+
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateHeatStackIdVfModule(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted()
+ .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleHeatStackId")
+ .hasNotPassed("UpdateVfModuleStatus", "CreateVfModuleBB_End");
+ assertThat(pi).isEnded();
+
+ }
+
+ @Test
public void rainyDayCreateVfModuleUpdateVfModuleStatusError_Test() throws Exception {
mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusCreatedVfModule(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
- .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleStatus")
+ .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter", "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus")
.hasNotPassed("CreateVfModuleBB_End");
assertThat(pi).isEnded();
}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java
index 980e609e97..eb372fb6a7 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java
@@ -36,7 +36,7 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest{
mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted();
+ assertThat(pi).isStarted().hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter", "UpdateVolumeGroupHeatStackId", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End");
assertThat(pi).isEnded();
assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter","UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End");
}
@@ -46,7 +46,20 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest{
doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterCreateTasks).createVolumeGroupRequest(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted();
+ assertThat(pi).isStarted()
+ .hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter")
+ .hasNotPassed("UpdateVolumeGroupHeatStackId", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayCreateVolumeGroupUpdateHeatStackIdError_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateHeatStackIdVolumeGroup(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVolumeGroupBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted()
+ .hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter")
+ .hasNotPassed("UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End");
assertThat(pi).isEnded();
assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter")
.hasNotPassed("Vnf_Adapter", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End");
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java
index ad374e3304..2c5381de09 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java
@@ -36,7 +36,7 @@ public class UnassignNetwork1802BBTest extends BaseBPMNTest {
public void sunnyDayAssignNetwork_Test() throws InterruptedException {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB",variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_GetL3NetworkById","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","End_UnassignNetworkBB");
+ assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","End_UnassignNetworkBB");
assertThat(pi).isEnded();
}
@@ -46,8 +46,8 @@ public class UnassignNetwork1802BBTest extends BaseBPMNTest {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB", variables);
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
- .hasPassedInOrder("Start_UnassignNetworkBB", "Task_GetL3NetworkById", "Task_VfModuleRelatioship")
+ .hasPassedInOrder("Start_UnassignNetworkBB", "Task_VfModuleRelatioship")
.hasNotPassed("End_UnassignNetworkBB");
assertThat(pi).isEnded();
}
-}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml
index aa7f118673..ab0ac25a99 100644
--- a/bpmn/so-bpmn-infrastructure-common/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-common/pom.xml
@@ -20,6 +20,51 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
+ </additionalProjectnatures>
+ <sourceIncludes>
+ <sourceInclude>**/*.groovy</sourceInclude>
+ </sourceIncludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.5</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.gmaven.runtime</groupId>
+ <artifactId>gmaven-runtime-2.0</artifactId>
+ <version>1.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ <version>${groovy.version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <debug>false</debug>
+ <verbose>true</verbose>
+ <stacktrace>true</stacktrace>
+ <defaultScriptExtension>.groovy</defaultScriptExtension>
+ <providerSelection>2.0</providerSelection>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>testCompile</goal>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
@@ -134,17 +179,17 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- <version>3.1.12</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- <version>3.1.12</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- <version>3.1.11</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
@@ -189,7 +234,7 @@
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
- <version>2.0</version>
+ <version>${jax.ws.rs}</version>
</dependency>
<dependency>
<groupId>org.onap.so</groupId>
@@ -265,5 +310,12 @@
<version>2.2.3</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>MSOCommonBPMN</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
index 69e973d7c3..545cba7f8c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.bpmn.infrastructure.scripts
+package org.onap.so.bpmn.infrastructure.scripts
import org.apache.commons.lang3.StringUtils
import org.camunda.bpm.engine.delegate.BpmnError
@@ -162,8 +162,131 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
//here convert json string to xml string
String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(networkInputParametersJson)))
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyCreateRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String sdncTopologyActivateRequest = ""
+
+ switch (modelName) {
+ case ~/^Site$/:
+ sdncTopologyActivateRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ </service-information>
+ <vnf-information>
+ <vnf-id></vnf-id>
+ <vnf-type></vnf-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </vnf-information>
+ <vnf-input-parameters>
+ <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
+ </vnf-input-parameters>
+ <vnf-request-input>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <neutron-id></neutron-id>
+ <contrail-network-fqdn></contrail-network-fqdn>
+ <subnets-data>
+ <subnet-data>
+ <element>
+ <ip-version></ip-version>
+ <subnet-id></subnet-id>
+ </subnet-data>
+ </subnets-data>
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ case ~/^SOTNAttachment$/:
+ sdncTopologyActivateRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ </service-information>
+ <allotted-resource-information>
+ <!-- TODO: to be filled as per the request input -->
+ <allotted-resource-input></allotted-resource-input>
+ <allotted-resource-type></allotted-resource-type>
+ <parent-service-instance-id><parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <connection-attachment-request-input>
+ <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
+ </connection-attachment-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ default:
+ sdncTopologyActivateRequest =
+ """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
@@ -196,6 +319,8 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
<global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
+ <!-- TODO: to be filled by response from create -->
+ <network-id></network-id>
<onap-model-information>
<model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
<model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
@@ -210,10 +335,12 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
- String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
- msoLogger.debug(sndcTopologyCreateRequesAsString)
- execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
- msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyCreateRequesAsString)
+ }
+
+ String sdncTopologyActivateRequesAsString = utils.formatXml(sdncTopologyActivateRequest)
+ msoLogger.debug(sdncTopologyActivateRequesAsString)
+ execution.setVariable("sdncAdapterWorkflowRequest", sdncTopologyActivateRequesAsString)
+ msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sdncTopologyActivateRequesAsString)
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
index 880a44c1b2..880a44c1b2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
index a2f4e35df1..f11022dc08 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
*
@@ -18,12 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
import org.json.JSONObject
-import org.json.XML;
+import org.json.XML
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
import groovy.xml.XmlUtil
import groovy.json.*
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -31,7 +31,7 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.common.recipe.ResourceInput;
+import org.onap.so.bpmn.common.recipe.ResourceInput
import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
@@ -39,13 +39,14 @@ import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.Abstr
import org.onap.so.rest.APIResponse
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
-import java.util.UUID;
+import java.util.UUID
+import org.onap.so.logger.MsoLogger
import org.camunda.bpm.engine.runtime.Execution
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.codec.binary.Base64
import org.springframework.web.util.UriUtils
import org.onap.so.rest.RESTClient
import org.onap.so.rest.RESTConfig
@@ -56,24 +57,25 @@ import org.onap.so.rest.RESTConfig
*/
public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcessor {
- String Prefix="CRE3rdONAPESI_"
+ String Prefix = "CRE3rdONAPESI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, Create3rdONAPE2EServiceInstance.class)
public void checkSPPartnerInfo (DelegateExecution execution) {
- def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started checkSPPartnerInfo *****", isDebugEnabled)
+ msoLogger.info(" ***** Started checkSPPartnerInfo *****")
try {
//get bpmn inputs from resource request.
String requestId = execution.getVariable("mso-request-id")
String requestAction = execution.getVariable("requestAction")
- utils.log("INFO","The requestAction is: " + requestAction, isDebugEnabled)
+ msoLogger.info("The requestAction is: " + requestAction)
String recipeParamsFromRequest = execution.getVariable("recipeParams")
- utils.log("INFO","The recipeParams is: " + recipeParamsFromRequest, isDebugEnabled)
+ msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
String resourceInput = execution.getVariable("resourceInput")
- utils.log("INFO","The resourceInput is: " + resourceInput, isDebugEnabled)
+ msoLogger.info("The resourceInput is: " + resourceInput)
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
String resourceInputPrameters = resourceInputObj.getResourceParameters()
@@ -81,175 +83,172 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
JSONObject inputParameters = new JSONObject(customizeResourceParam(inputParametersJson))
// set local resourceInput
- execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ execution.setVariable(Prefix + "ResourceInput", resourceInputObj)
boolean is3rdONAPExist = false
- if(inputParameters.has("id"))
- {
- String sppartnerId = inputParameters.get("id")
- }
if(inputParameters.has("url"))
{
String sppartnerUrl = inputParameters.get("url")
if(!isBlank(sppartnerUrl)) {
- execution.setVariable(Prefix + "sppartnerUrl", sppartnerUrl)
+ execution.setVariable(Prefix + "SppartnerUrl", sppartnerUrl)
is3rdONAPExist = true
}
else {
is3rdONAPExist = false
String msg = "sppartner Url is blank."
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
}
}
if(inputParameters.has("providingServiceInvarianteUuid"))
{
String sppartnerInvarianteUUID = inputParameters.get("providingServiceInvarianteUuid")
- execution.setVariable(Prefix + "sppartnerInvarianteUUID", sppartnerInvarianteUUID)
+ execution.setVariable(Prefix + "SppartnerInvarianteUUID", sppartnerInvarianteUUID)
is3rdONAPExist = true
}
else {
is3rdONAPExist = false
String msg = "sppartner providingServiceInvarianteUuid is blank."
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
}
if(inputParameters.has("providingServiceUuid"))
{
String sppartnerUUID = inputParameters.get("providingServiceUuid")
- execution.setVariable(Prefix + "sppartnerUUID", sppartnerUUID)
+ execution.setVariable(Prefix + "SppartnerUUID", sppartnerUUID)
is3rdONAPExist = true
}
else {
is3rdONAPExist = false
String msg = "sppartner providingServiceUuid is blank."
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
}
if(inputParameters.has("handoverMode"))
{
String handoverMode = inputParameters.get("handoverMode")
- execution.setVariable(Prefix + "handoverMode", handoverMode)
+ execution.setVariable(Prefix + "HandoverMode", handoverMode)
is3rdONAPExist = true
}
else {
is3rdONAPExist = false
String msg = "sppartner handoverMode is blank."
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
}
execution.setVariable("Is3rdONAPExist", is3rdONAPExist)
- execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
+ execution.setVariable(Prefix + "ServiceInstanceId", resourceInputObj.getServiceInstanceId())
execution.setVariable("mso-request-id", requestId)
execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
} catch (BpmnError e) {
- throw e;
+ throw e
} catch (Exception ex){
String msg = "Exception in checkSPPartnerInfo " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
public void checkLocallCall (DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started checkLocallCall *****", isDebugEnabled)
+ msoLogger.info(" ***** Started checkLocallCall *****")
try {
//Get ResourceInput Object
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
//uuiRequest
String incomingRequest = resourceInputObj.getRequestsInputs()
String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
- JSONObject inputParameters = new JSONObject(customizeResourceParam(serviceParameters))
- execution.setVariable(Prefix + "serviceParameters", inputParameters)
+ String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs")
+ JSONObject inputParameters = new JSONObject(customizeResourceParam(requestInputs))
+ execution.setVariable(Prefix + "ServiceParameters", inputParameters)
- // CallSource is added only when ONAP SO calling 3rdONAP SO(Remote call)
+ // CallSource is added only when ONAP SO calling 3rdONAP(External API) SO(Remote call)
boolean isLocalCall = true
+ String callSource = "UUI"
if(inputParameters.has("CallSource"))
{
- String callSource = inputParameters.get("CallSource")
- if("3rdONAP".equalsIgnoreCase(callSource)) {
+ callSource = inputParameters.get("CallSource")
+ if("ExternalAPI".equalsIgnoreCase(callSource)) {
+ String sppartnerId = inputParameters.get("SppartnerServiceId")
+ execution.setVariable(Prefix + "SppartnerServiceId", sppartnerId)
isLocalCall = false
- }
- execution.setVariable(Prefix + "CallSource", callSource)
- utils.log("DEBUG", "callSource is: " + callSource , isDebugEnabled)
- isLocalCall = true
+ }
}
+ execution.setVariable(Prefix + "CallSource", callSource)
+ msoLogger.debug("callSource is: " + callSource )
execution.setVariable("IsLocalCall", isLocalCall)
- } catch (BpmnError e) {
- throw e;
} catch (Exception ex){
String msg = "Exception in checkLocallCall " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
public void preProcessRequest(DelegateExecution execution){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started preProcessRequest *****", isDebugEnabled)
+ msoLogger.info(" ***** Started preProcessRequest *****")
try {
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
String msg = ""
String globalSubscriberId = resourceInputObj.getGlobalSubscriberId()
if (isBlank(globalSubscriberId)) {
msg = "Input globalSubscriberId is null"
- utils.log("INFO", msg, isDebugEnabled)
+ msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
//set local variable
- execution.setVariable("globalSubscriberId", globalSubscriberId);
- utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ msoLogger.info("globalSubscriberId:" + globalSubscriberId)
String serviceType = resourceInputObj.getServiceType()
if (isBlank(serviceType)) {
msg = "Input serviceType is null"
- utils.log("INFO", msg, isDebugEnabled)
+ msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
execution.setVariable("serviceType", serviceType)
- utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)
+ msoLogger.info("serviceType:" + serviceType)
- String resourceName = resourceInputObj.getResourceInstanceName();
+ String resourceName = resourceInputObj.getResourceInstanceName()
if (isBlank(resourceName)) {
msg = "Input resourceName is null"
- utils.log("INFO", msg, isDebugEnabled)
+ msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
execution.setVariable("resourceName", resourceName)
- utils.log("INFO", "resourceName:" + resourceName, isDebugEnabled)
+ msoLogger.info("resourceName:" + resourceName)
int beginIndex = resourceName.indexOf("_") + 1
String serviceInstanceName = resourceName.substring(beginIndex)
execution.setVariable("serviceInstanceName", serviceInstanceName)
- String serviceInstanceId = resourceInputObj.getServiceInstanceId();
+ String serviceInstanceId = resourceInputObj.getServiceInstanceId()
if (isBlank(serviceInstanceId)) {
msg = "Input serviceInstanceId is null"
- utils.log("INFO", msg, isDebugEnabled)
+ msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
- execution.setVariable("serviceInstanceId", serviceInstanceId)
- utils.log("INFO", "serviceInstanceId:" + serviceInstanceId, isDebugEnabled)
+ execution.setVariable(Prefix + "ServiceInstanceId", serviceInstanceId)
+ msoLogger.info("serviceInstanceId:" + serviceInstanceId)
} catch (BpmnError e) {
- throw e;
+ throw e
} catch (Exception ex){
String msg = "Exception in preProcessRequest " + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
public void prepareUpdateProgress(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepareUpdateProgress *****", isDebugEnabled)
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ msoLogger.info(" ***** Started prepareUpdateProgress *****")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
String operType = resourceInputObj.getOperationType()
String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
@@ -274,51 +273,62 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
<statusDescription>${statusDescription}</statusDescription>
</ns:updateResourceOperationStatus>
</soapenv:Body>
- </soapenv:Envelope>""";
+ </soapenv:Envelope>"""
setProgressUpdateVariables(execution, body)
- utils.log("INFO"," ***** End prepareUpdateProgress *****", isDebugEnabled)
+ msoLogger.info(" ***** Exit prepareUpdateProgress *****")
}
public void allocateCrossONAPResource(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started allocateCrossONAPResource *****", isDebugEnabled)
+ msoLogger.info(" ***** Started allocateCrossONAPResource *****")
//get TP links from AAI for SOTN handoverMode only
- String handoverMode = execution.getVariable(Prefix + "handoverMode")
+ String handoverMode = execution.getVariable(Prefix + "HandoverMode")
if("SOTN".equalsIgnoreCase(handoverMode)) {
- //to do get tp link in AAI
-
-
// Put TP Link info into serviceParameters
- String accessProviderId = ""
- String accessClientId = ""
- String accessTopologyId = ""
- String accessNodeId = ""
- String accessLtpId = ""
- JSONObject inputParameters = execution.getVariable(Prefix + "serviceParameters")
- inputParameters.put("access-provider-id", accessProviderId)
- inputParameters.put("access-client-id", accessClientId)
- inputParameters.put("access-topology-id", accessTopologyId)
- inputParameters.put("access-node-id", accessNodeId)
- inputParameters.put("access-ltp-id", accessLtpId)
- execution.setVariable(Prefix + "serviceParameters", inputParameters)
+ JSONObject inputParameters = execution.getVariable(Prefix + "ServiceParameters")
+
+ Map<String, Object> crossTPs = new HashMap<String, Object>();
+ crossTPs.put("local-access-provider-id", inputParameters.get("remote-access-provider-id"));
+ crossTPs.put("local-access-client-id", inputParameters.get("remote-access-client-id"));
+ crossTPs.put("local-access-topology-id", inputParameters.get("remote-access-topology-id"));
+ crossTPs.put("local-access-node-id", inputParameters.get("remote-access-node-id"));
+ crossTPs.put("local-access-ltp-id", inputParameters.get("remote-access-ltp-id"));
+ crossTPs.put("remote-access-provider-id", inputParameters.get("local-access-provider-id"));
+ crossTPs.put("remote-access-client-id", inputParameters.get("local-client-id"));
+ crossTPs.put("remote-access-topology-id", inputParameters.get("local-topology-id"));
+ crossTPs.put("remote-access-node-id", inputParameters.get("local-node-id"));
+ crossTPs.put("remote-access-ltp-id", inputParameters.get("local-ltp-id"));
+
+ inputParameters.put("local-access-provider-id", crossTPs.get("local-access-provider-id"));
+ inputParameters.put("local-access-client-id", crossTPs.get("local-access-client-id"));
+ inputParameters.put("local-access-topology-id", crossTPs.get("local-access-topology-id"));
+ inputParameters.put("local-access-node-id", crossTPs.get("local-access-node-id"));
+ inputParameters.put("local-access-ltp-id", crossTPs.get("local-access-ltp-id"));
+ inputParameters.put("remote-access-provider-id", crossTPs.get("remote-access-provider-id"));
+ inputParameters.put("remote-access-client-id", crossTPs.get("remote-client-id"));
+ inputParameters.put("remote-access-topology-id", crossTPs.get("remote-topology-id"));
+ inputParameters.put("remote-access-node-id", crossTPs.get("remote-node-id"));
+ inputParameters.put("remote-access-ltp-id", crossTPs.get("remote-ltp-id"));
+
+ execution.setVariable(Prefix + "ServiceParameters", inputParameters)
}
- utils.log("INFO", "Exited " + allocateCrossONAPResource, isDebugEnabled)
+ msoLogger.info("Exit " + allocateCrossONAPResource)
}
public void prepare3rdONAPRequest(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started prepare3rdONAPRequest *****", isDebugEnabled)
+ msoLogger.info(" ***** Started prepare3rdONAPRequest *****")
- String sppartnerUrl = execution.getVariable(Prefix + "sppartnerUrl")
+ String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
String extAPIPath = sppartnerUrl + 'serviceOrder'
execution.setVariable("ExternalAPIURL", extAPIPath)
// ExternalAPI message format
String externalId = execution.getVariable("resourceName")
- String category = "Network Service"
+ String category = "E2E Service"
String description = "Service Order from SPPartner"
String requestedStartDate = utils.generateCurrentTimeInUtc()
String requestedCompletionDate = utils.generateCurrentTimeInUtc()
@@ -326,12 +336,12 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
String subscriberId = execution.getVariable("globalSubscriberId")
String customerRole = ""
String subscriberName = ""
- String referredType = execution.getVariable("serviceType")
+ String referredType = "Consumer"
String orderItemId = "1"
String action = "add" //for create
String serviceState = "active"
String serviceName = execution.getVariable("serviceInstanceName")
- String serviceId = execution.getVariable("serviceInstanceId")
+ String serviceUuId = execution.setVariable(Prefix + "SppartnerUUID")
Map<String, String> valueMap = new HashMap<>()
valueMap.put("externalId", '"' + externalId + '"')
@@ -347,23 +357,36 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
valueMap.put("orderItemId", '"' + orderItemId + '"')
valueMap.put("action", '"' + action + '"')
valueMap.put("serviceState", '"' + serviceState + '"')
+ valueMap.put("serviceId", '""')//To be confirmed
valueMap.put("serviceName", '"' + serviceName + '"')
- valueMap.put("serviceId", '"' + serviceId + '"')
+ valueMap.put("serviceUuId", '"' + serviceUuId + '"')
ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
- // insert CallSource='3rdONAP' to uuiRequest
- Map<String, String> callSourceMap = new HashMap<>()
- callSourceMap.put("inputName", "CallSource")
- callSourceMap.put("inputValue", "3rdONAP")
- String _requestInputs_ = externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, callSourceMap)
+ // insert CallSource='ExternalAPI' to uuiRequest
+ Map<String, String> requestInputsMap = new HashMap<>()
+ requestInputsMap.put("inputName", "CallSource")
+ requestInputsMap.put("inputValue", "ExternalAPI")
+ String _requestInputs_ = externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, requestInputsMap)
+
+ requestInputsMap.clear()
+ String serviceInstanceId = execution.getVariable(Prefix + "ServiceInstanceId")
+ requestInputsMap.put("inputName", "SppartnerServiceId")
+ requestInputsMap.put("inputValue", serviceInstanceId)
+ _requestInputs_ += ",\n" + externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, requestInputsMap)
+
+ requestInputsMap.clear()
+ String serviceType = execution.getVariable("serviceType")
+ requestInputsMap.put("inputName", "serviceType")
+ requestInputsMap.put("inputValue", serviceType)
+ _requestInputs_ += ",\n" + externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, requestInputsMap)
// Transfer all uuiRequest incomeParameters to ExternalAPI format
- JSONObject inputParameters = execution.getVariable(Prefix + "serviceParameters")
+ JSONObject inputParameters = execution.getVariable(Prefix + "ServiceParameters")
for(String key : inputParameters.keySet()) {
- String inputName = key;
- String inputValue = inputParameters.opt(key);
- Map<String, String> requestInputsMap = new HashMap<>()
+ String inputName = key
+ String inputValue = inputParameters.opt(key)
+ requestInputsMap.clear()
requestInputsMap.put("inputName", '"' + inputName+ '"')
requestInputsMap.put("inputValue", '"' + inputValue + '"')
_requestInputs_ += ",\n" + externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, requestInputsMap)
@@ -371,49 +394,49 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
valueMap.put("_requestInputs_", _requestInputs_)
String payload = externalAPIUtil.setTemplate(ExternalAPIUtil.PostServiceOrderRequestsTemplate, valueMap)
- execution.setVariable(Prefix + "payload", payload)
- utils.log("INFO", "Exited " + prepare3rdONAPRequest, isDebugEnabled)
+ execution.setVariable(Prefix + "Payload", payload)
+ msoLogger.info("Exit " + prepare3rdONAPRequest)
}
public void doCreateE2ESIin3rdONAP(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started doCreateE2ESIin3rdONAP *****", isDebugEnabled)
+ msoLogger.info(" ***** Started doCreateE2ESIin3rdONAP *****")
String extAPIPath = execution.getVariable("ExternalAPIURL")
- String payload = execution.getVariable(Prefix + "payload")
+ String payload = execution.getVariable(Prefix + "Payload")
ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
APIResponse response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
int responseCode = response.getStatusCode()
- execution.setVariable(Prefix + "postServiceOrderResponseCode", responseCode)
- utils.log("DEBUG", "Post ServiceOrder response code is: " + responseCode, isDebugEnabled)
+ execution.setVariable(Prefix + "PostServiceOrderResponseCode", responseCode)
+ msoLogger.debug("Post ServiceOrder response code is: " + responseCode)
String extApiResponse = response.getResponseBodyAsString()
JSONObject responseObj = new JSONObject(extApiResponse)
- execution.setVariable(Prefix + "postServiceOrderResponse", extApiResponse)
+ execution.setVariable(Prefix + "PostServiceOrderResponse", extApiResponse)
//Process Response
if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
//200 OK 201 CREATED 202 ACCEPTED
{
- utils.log("DEBUG", "Post ServiceOrder Received a Good Response", isDebugEnabled)
+ msoLogger.debug("Post ServiceOrder Received a Good Response")
String serviceOrderId = responseObj.get("ServiceOrderId")
execution.setVariable(Prefix + "SuccessIndicator", true)
execution.setVariable("serviceOrderId", serviceOrderId)
}
else{
- utils.log("DEBUG", "Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+ msoLogger.debug("Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
}
- utils.log("INFO", "Exited " + doCreateE2ESIin3rdONAP, isDebugEnabled)
+ msoLogger.info("Exit " + doCreateE2ESIin3rdONAP)
}
public void getE2ESIProgressin3rdONAP(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started getE2ESIProgressin3rdONAP *****", isDebugEnabled)
+ msoLogger.info(" ***** Started getE2ESIProgressin3rdONAP *****")
String extAPIPath = execution.getVariable("ExternalAPIURL")
extAPIPath += "/" + execution.getVariable("ServiceOrderId")
@@ -423,18 +446,22 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
APIResponse response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
int responseCode = response.getStatusCode()
- execution.setVariable(Prefix + "getServiceOrderResponseCode", responseCode)
- utils.log("DEBUG", "Get ServiceOrder response code is: " + responseCode, isDebugEnabled)
+ execution.setVariable(Prefix + "GetServiceOrderResponseCode", responseCode)
+ msoLogger.debug("Get ServiceOrder response code is: " + responseCode)
String extApiResponse = response.getResponseBodyAsString()
JSONObject responseObj = new JSONObject(extApiResponse)
- execution.setVariable(Prefix + "getServiceOrderResponse", extApiResponse)
+ execution.setVariable(Prefix + "GetServiceOrderResponse", extApiResponse)
//Process Response //200 OK 201 CREATED 202 ACCEPTED
if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
{
- utils.log("DEBUG", "Get ServiceOrder Received a Good Response", isDebugEnabled)
- String serviceOrderState = responseObj.get("State")
+ msoLogger.debug("Get ServiceOrder Received a Good Response")
+
+ String sppartnerServiceId = responseObj.get("orderIterm.service.id")
+ execution.setVariable(Prefix + "SppartnerServiceId", sppartnerServiceId)
+
+ String serviceOrderState = responseObj.get("orderIterm.state")
execution.setVariable(Prefix + "SuccessIndicator", true)
execution.setVariable("serviceOrderState", serviceOrderState)
@@ -463,14 +490,14 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
execution.setVariable("statusDescription", "Create Service Order Status is " + serviceOrderState)
}
else{
- utils.log("DEBUG", "Get ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+ msoLogger.debug("Get ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
execution.setVariable("progress", 100)
execution.setVariable("status", "error")
execution.setVariable("statusDescription", "Get ServiceOrder Received a bad response")
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get ServiceOrder Received a bad response from 3rdONAP External API")
}
- utils.log("INFO", "Exited " + getE2ESIProgressin3rdONAP, isDebugEnabled)
+ msoLogger.info("Exit " + getE2ESIProgressin3rdONAP)
}
/**
@@ -479,19 +506,22 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
public void timeDelay(DelegateExecution execution) {
def isDebugEnabled= execution.getVariable("isDebugLogEnabled")
try {
- Thread.sleep(5000);
+ Thread.sleep(5000)
} catch(InterruptedException e) {
- utils.log("ERROR", "Time Delay exception" + e , isDebugEnabled)
+ utils.log("ERROR", "Time Delay exception" + e )
}
}
public void saveSPPartnerInAAI(DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started postCreateE2ESIin3rdONAP *****", isDebugEnabled)
+ msoLogger.info(" ***** Started postCreateE2ESIin3rdONAP *****")
- String sppartnerId = UUID.randomUUID().toString()
- String sppartnerUrl = execution.getVariable(Prefix + "sppartnerUrl")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String sppartnerId = execution.getVariable(Prefix + "SppartnerServiceId")
+ String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
+ String callSource = execution.getVariable(Prefix + "CallSource")
+ String serviceInstanceId = execution.getVariable(Prefix + "ServiceInstanceId")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessSPPartnerUri(execution)
@@ -501,10 +531,18 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
"""<sp-partner xmlns=\"${namespace}\">
<id>${sppartnerId}</id>
<url>${sppartnerUrl}</url>
- <service-instance>
- <service-instance-id>${serviceInstanceId}</service-instance-id>
- </service-instance>
- </sp-partner>""".trim()
+ <callsource>${callSource}</callsource>
+ <relationship-list>
+ <relationship>
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v14/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}</related-link>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${serviceInstanceId}</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </sp-partner>""".trim()
utils.logAudit(payload)
String aai_endpoint = execution.getVariable("URN_aai_endpoint")
@@ -512,28 +550,28 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
APIResponse response = aaiUriUtil.executeAAIPutCall(execution, serviceAaiPath, payload)
int responseCode = response.getStatusCode()
- execution.setVariable(Prefix + "putSppartnerResponseCode", responseCode)
- utils.log("DEBUG", " Put sppartner response code is: " + responseCode, isDebugEnabled)
+ execution.setVariable(Prefix + "PutSppartnerResponseCode", responseCode)
+ msoLogger.debug(" Put sppartner response code is: " + responseCode)
String aaiResponse = response.getResponseBodyAsString()
aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
- execution.setVariable(Prefix + "putSppartnerResponse", aaiResponse)
+ execution.setVariable(Prefix + "PutSppartnerResponse", aaiResponse)
//Process Response
if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
//200 OK 201 CREATED 202 ACCEPTED
{
- utils.log("DEBUG", "PUT sppartner Received a Good Response", isDebugEnabled)
+ msoLogger.debug("PUT sppartner Received a Good Response")
execution.setVariable(Prefix + "SuccessIndicator", true)
}
else
{
- utils.log("DEBUG", "Put sppartner Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled)
+ msoLogger.debug("Put sppartner Received a Bad Response Code. Response Code is: " + responseCode)
exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
throw new BpmnError("MSOWorkflowException")
}
- utils.log("INFO", "Exited " + saveSPPartnerInAAI, isDebugEnabled)
+ msoLogger.info("Exit " + saveSPPartnerInAAI)
}
private void setProgressUpdateVariables(DelegateExecution execution, String body) {
@@ -544,48 +582,48 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
public void postProcess(DelegateExecution execution){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** Started postProcess *****", isDebugEnabled)
- String responseCode = execution.getVariable(Prefix + "putSppartnerResponseCode")
- String responseObj = execution.getVariable(Prefix + "putSppartnerResponse")
+ msoLogger.info(" ***** Started postProcess *****")
+ String responseCode = execution.getVariable(Prefix + "PutSppartnerResponseCode")
+ String responseObj = execution.getVariable(Prefix + "PutSppartnerResponse")
- utils.log("INFO","response from AAI for put sppartner, response code :" + responseCode + " response object :" + responseObj, isDebugEnabled)
- utils.log("INFO"," ***** Exit postProcess *****", isDebugEnabled)
+ msoLogger.info("response from AAI for put sppartner, response code :" + responseCode + " response object :" + responseObj)
+ msoLogger.info(" ***** Exit postProcess *****")
}
public void sendSyncResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+ msoLogger.debug(" *** sendSyncResponse *** ")
try {
String operationStatus = "finished"
// RESTResponse for main flow
String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
- utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
sendWorkflowResponse(execution, 202, resourceOperationResp)
execution.setVariable("sentSyncResponse", true)
} catch (Exception ex) {
String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
- utils.log("DEBUG", msg, isDebugEnabled)
+ msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ msoLogger.debug(" ***** Exit sendSyncResopnse *****")
}
String customizeResourceParam(String inputParametersJson) {
- List<Map<String, Object>> paramList = new ArrayList();
- JSONObject jsonObject = new JSONObject(inputParametersJson);
- Iterator iterator = jsonObject.keys();
+ List<Map<String, Object>> paramList = new ArrayList()
+ JSONObject jsonObject = new JSONObject(inputParametersJson)
+ Iterator iterator = jsonObject.keys()
while (iterator.hasNext()) {
- String key = iterator.next();
- HashMap<String, String> hashMap = new HashMap();
- hashMap.put("name", key);
+ String key = iterator.next()
+ HashMap<String, String> hashMap = new HashMap()
+ hashMap.put("name", key)
hashMap.put("value", jsonObject.get(key))
paramList.add(hashMap)
}
- Map<String, List<Map<String, Object>>> paramMap = new HashMap();
- paramMap.put("param", paramList);
+ Map<String, List<Map<String, Object>>> paramMap = new HashMap()
+ paramMap.put("param", paramList)
- return new JSONObject(paramMap).toString();
+ return new JSONObject(paramMap).toString()
}
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index 1034fa2d4d..1034fa2d4d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy
new file mode 100644
index 0000000000..15b63fb5ab
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateDeviceResource.groovy
@@ -0,0 +1,194 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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.onap.so.bpmn.infrastructure.scripts
+
+import org.json.JSONObject
+import org.json.XML;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.recipe.ResourceInput;
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.onap.so.rest.APIResponse;
+import org.onap.so.bpmn.common.scripts.AaiUtil
+
+/**
+ * This groovy class supports the <class>CreateDeviceResource.bpmn</class> process.
+ * flow for Device Resource Create
+ */
+public class CreateDeviceResource extends AbstractServiceTaskProcessor {
+
+ String Prefix="CREDEVRES_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CreateDeviceResource.class)
+
+ public void preProcessRequest(DelegateExecution execution){
+ msoLogger.info(" ***** Started preProcessRequest *****")
+ try {
+
+ //get bpmn inputs from resource request.
+ String requestId = execution.getVariable("mso-request-id")
+ String requestAction = execution.getVariable("requestAction")
+ msoLogger.info("The requestAction is: " + requestAction)
+ String recipeParamsFromRequest = execution.getVariable("recipeParams")
+ msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
+ String resourceInput = execution.getVariable("resourceInput")
+ msoLogger.info("The resourceInput is: " + resourceInput)
+ //Get ResourceInput Object
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ String resourceInputPrameters = resourceInputObj.getResourceParameters()
+ String inputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+ JSONObject inputParameters = new JSONObject(customizeResourceParam(inputParametersJson))
+ execution.setVariable(Prefix + "resourceRequestInputs", inputParameters)
+
+ //Deal with recipeParams
+ String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
+ String resourceName = resourceInputObj.getResourceInstanceName()
+ //For sdnc requestAction default is "createNetworkInstance"
+ String operationType = "Network"
+ if(!StringUtils.isBlank(recipeParamsFromRequest)){
+ //the operationType from worflow(first node) is second priority.
+ operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
+ }
+ if(!StringUtils.isBlank(recipeParamsFromWf)){
+ //the operationType from worflow(first node) is highest priority.
+ operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
+ }
+
+ execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
+ execution.setVariable("mso-request-id", requestId)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ String customizeResourceParam(String networkInputParametersJson) {
+ List<Map<String, Object>> paramList = new ArrayList();
+ JSONObject jsonObject = new JSONObject(networkInputParametersJson);
+ Iterator iterator = jsonObject.keys();
+ while (iterator.hasNext()) {
+ String key = iterator.next();
+ HashMap<String, String> hashMap = new HashMap();
+ hashMap.put("name", key);
+ hashMap.put("value", jsonObject.get(key))
+ paramList.add(hashMap)
+ }
+ Map<String, List<Map<String, Object>>> paramMap = new HashMap();
+ paramMap.put("param", paramList);
+
+ return new JSONObject(paramMap).toString();
+ }
+
+ public void checkDevType(DelegateExecution execution){
+ msoLogger.info(" ***** Started checkDevType *****")
+ try {
+
+ JSONObject inputParameters = execution.getVariable(Prefix + "resourceRequestInputs")
+
+ String devType = inputParameters.get("device_class")
+
+ if(StringUtils.isBlank(devType)) {
+ devType = "OTHER"
+ }
+
+ execution.setVariable("device_class", devType)
+
+ } catch (Exception ex){
+ String msg = "Exception in checkDevType " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void getVNFTemplatefromSDC(DelegateExecution execution){
+ msoLogger.info(" ***** Started getVNFTemplatefromSDC *****")
+ try {
+ // To do
+
+
+ } catch (Exception ex){
+ String msg = "Exception in getVNFTemplatefromSDC " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void postVNFInfoProcess(DelegateExecution execution){
+ msoLogger.info(" ***** Started postVNFInfoProcess *****")
+ try {
+ // To do
+
+
+ } catch (Exception ex){
+ String msg = "Exception in postVNFInfoProcess " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ msoLogger.debug(" *** sendSyncResponse *** ")
+
+ try {
+ String operationStatus = "finished"
+ // RESTResponse for main flow
+ String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ sendWorkflowResponse(execution, 202, resourceOperationResp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
index 4405718c57..4405718c57 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericALaCarteServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
index d665de2ba7..d665de2ba7 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index cc0f9bb5f4..c819da4be4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -163,8 +163,130 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
//here convert json string to xml string
String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(networkInputParametersJson)))
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyCreateRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String sdncTopologyCreateRequest = ""
+
+ switch (modelName) {
+ case ~/^Site$/:
+ sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ </service-information>
+ <subscriber-name>${MsoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
+ <vnf-information>
+ <!-- TODO: to be filled as per the request input -->
+ <vnf-id></vnf-id>
+ <vnf-type></vnf-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </network-information>
+ <vnf-input-parameters>
+ <network-input-parameters>${MsoUtils.xmlEscape(netowrkInputParameters)}</network-input-parameters>
+ </vnf-input-parameters>
+ <vnf-request-input>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <neutron-id></neutron-id>
+ <contrail-network-fqdn></contrail-network-fqdn>
+ <subnets-data>
+ <subnet-data>
+ <element>
+ <ip-version></ip-version>
+ <subnet-id></subnet-id>
+ </subnet-data>
+ </subnets-data>
+ </vnf-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ case ~/^SOTNAttachment$/:
+ sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ </service-information>
+ <subscriber-name>${MsoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
+ <allotted-resource-information>
+ <!-- TODO: to be filled as per the request input -->
+ <allotted-resource-type></allotted-resource-type>
+ <parent-service-instance-id><parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <connection-attachment-request-input>
+ <param>${MsoUtils.xmlEscape(netowrkInputParameters)}</param>
+ </connection-attachment-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ default:
+ sdncTopologyCreateRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
@@ -210,8 +332,9 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
</network-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ }
- String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+ String sndcTopologyCreateRequesAsString = utils.formatXml(sdncTopologyCreateRequest)
msoLogger.debug(sndcTopologyCreateRequesAsString)
execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
msoLogger.debug("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyCreateRequesAsString)
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
index 26f12831bd..26f12831bd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
index 308c93540f..6acabe14a0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -36,7 +36,9 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.infrastructure.aai.AAICreateResources;
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
-
+import org.w3c.dom.*
+import javax.xml.parsers.*
+import org.xml.sax.InputSource
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
index aa569655f4..aa569655f4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
index 9c25a57adc..9c25a57adc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
index 31bda63a49..a63aad14a2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
@@ -18,20 +18,20 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.bpmn.infrastructure.scripts
+package org.onap.so.bpmn.infrastructure.scripts
import org.apache.commons.lang3.StringUtils
import org.camunda.bpm.engine.delegate.BpmnError
import org.json.JSONObject
import org.json.XML
import org.onap.so.logger.MsoLogger
-import org.openecomp.mso.bpmn.common.recipe.ResourceInput
-import org.openecomp.mso.bpmn.common.resource.ResourceRequestBuilder
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
-import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
/**
* This groovy class supports the <class>ActivateSDNCCNetworkResource.bpmn</class> process.
@@ -128,8 +128,136 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyDeleteRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String sdncTopologyDeleteRequest = ""
+
+ switch (modelName) {
+ case ~/^Site$/:
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <subscriber-name></subscriber-name>
+ </service-information>
+ <vnf-information>
+ <!-- TODO: to be filled as per the request input -->
+ <vnf-id></vnf-id>
+ <vnf-type></vnf-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </network-information>
+ <vnf-request-input>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
+ <vnf-network>
+ <network-role></network-role>
+ <network-name></network-name>
+ <neutron-id></neutron-id>
+ <network-id></network-id>
+ <contrail-network-fqdn></contrail-network-fqdn>
+ <subnets-data>
+ <subnet-data>
+ <ip-version></ip-version>
+ <subnet-id></subnet-id>
+ </subnet-data>
+ </subnets-data>
+ </vnf-network>
+ </vnf-networks>
+ </vnf-request-input>
+ <vnf-input-parameters>
+ <param></param>
+ </vnf-input-parameters>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ case ~/^SOTNAttachment$/:
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <subscriber-name></subscriber-name>
+ </service-information>
+ <allotted-resource-information>
+ <!-- TODO: to be filled as per the request input -->
+ <allotted-resource-id></allotted-resource-id>
+ <allotted-resource-type></allotted-resource-type>
+ <parent-service-instance-id></parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <connection-attachment-request-input>
+ <param></param>
+ </connection-attachment-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+ default:
+ sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
@@ -175,8 +303,9 @@ public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor
</network-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ }
- String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
+ String sndcTopologyDeleteRequesAsString = utils.formatXml(sdncTopologyDeleteRequest)
utils.logAudit(sndcTopologyDeleteRequesAsString)
execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
msoLogger.info("sdncAdapterWorkflowRequest - " + "\n" + sndcTopologyDeleteRequesAsString)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
new file mode 100644
index 0000000000..63fd20eb2d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
@@ -0,0 +1,542 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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.onap.so.bpmn.infrastructure.scripts
+
+import org.json.JSONObject
+import org.json.XML
+
+import static org.apache.commons.lang3.StringUtils.*
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.ExternalAPIUtil
+import org.onap.so.bpmn.common.scripts.AaiUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.recipe.ResourceInput
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.rest.APIResponse
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
+import java.util.UUID
+import org.onap.so.logger.MsoLogger
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64
+import org.springframework.web.util.UriUtils
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+
+/**
+ * This groovy class supports the <class>Delete3rdONAPE2EServiceInstance.bpmn</class> process.
+ * flow for Delete 3rdONAPE2EServiceInstance in 3rdONAP
+ */
+public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcessor {
+
+ String Prefix = "CRE3rdONAPESI_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, Delete3rdONAPE2EServiceInstance.class)
+
+ public void checkSPPartnerInfoFromAAI (DelegateExecution execution) {
+ msoLogger.info(" ***** Started checkSPPartnerInfo *****")
+ try {
+ //get bpmn inputs from resource request.
+ String requestId = execution.getVariable("mso-request-id")
+ String requestAction = execution.getVariable("requestAction")
+ msoLogger.info("The requestAction is: " + requestAction)
+ String recipeParamsFromRequest = execution.getVariable("recipeParams")
+ msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
+ String resourceInput = execution.getVariable("resourceInput")
+ msoLogger.info("The resourceInput is: " + resourceInput)
+ //Get ResourceInput Object
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
+ // set local resourceInput
+ execution.setVariable(Prefix + "ResourceInput", resourceInputObj)
+
+ String resourceInstanceId = resourceInputObj.getResourceInstancenUuid()
+
+ // Get Sppartner from AAI
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String aai_uri = aaiUriUtil.getBusinessSPPartnerUri(execution)
+ String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
+ String aai_endpoint = execution.getVariable("URN_aai_endpoint")
+ String serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(sppartnerId,"UTF-8")
+ execution.setVariable(Prefix + "serviceAaiPath", serviceAaiPath)
+
+ getSPPartnerInAAI(execution)
+
+ String callSource = "UUI"
+ String sppartnerUrl = ""
+ if(execution.getVariable(Prefix + "SuccessIndicator")) {
+ callSource = execution.getVariable(Prefix + "CallSource")
+ }
+
+ boolean is3rdONAPExist = false
+ if(!isBlank(sppartnerUrl)) {
+ is3rdONAPExist = true
+ }
+
+ execution.setVariable("Is3rdONAPExist", is3rdONAPExist)
+ execution.setVariable(Prefix + "ServiceInstanceId", resourceInputObj.getServiceInstanceId())
+ execution.setVariable("mso-request-id", requestId)
+ execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex){
+ String msg = "Exception in checkSPPartnerInfoFromAAI " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void checkLocallCall (DelegateExecution execution) {
+ msoLogger.info(" ***** Started checkLocallCall *****")
+
+ boolean isLocalCall = true
+ String callSource = execution.getVariable(Prefix + "CallSource")
+ if("ExternalAPI".equalsIgnoreCase(callSource)) {
+ isLocalCall = false
+ }
+ execution.setVariable("IsLocalCall", isLocalCall)
+ }
+
+ public void preProcessRequest(DelegateExecution execution){
+ msoLogger.info(" ***** Started preProcessRequest *****")
+ try {
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ String msg = ""
+
+ String globalSubscriberId = resourceInputObj.getGlobalSubscriberId()
+ if (isBlank(globalSubscriberId)) {
+ msg = "Input globalSubscriberId is null"
+ msoLogger.info( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ //set local variable
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
+ msoLogger.info( "globalSubscriberId:" + globalSubscriberId)
+
+ String serviceType = resourceInputObj.getServiceType()
+ if (isBlank(serviceType)) {
+ msg = "Input serviceType is null"
+ msoLogger.info( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("serviceType", serviceType)
+ msoLogger.info( "serviceType:" + serviceType)
+
+ String operationId = resourceInputObj.getOperationId()
+ if (isBlank(operationId)) {
+ msg = "Input operationId is null"
+ msoLogger.info( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("operationId", operationId)
+ msoLogger.info( "operationId:" + operationId)
+
+ String resourceName = resourceInputObj.getResourceInstanceName()
+ if (isBlank(resourceName)) {
+ msg = "Input resourceName is null"
+ msoLogger.info( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("resourceName", resourceName)
+ msoLogger.info( "resourceInstanceId:" + resourceName)
+
+ String resourceTemplateId = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ if (isBlank(resourceTemplateId)) {
+ msg = "Input resourceTemplateId is null"
+ msoLogger.info( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ execution.setVariable("resourceTemplateId", resourceTemplateId)
+ msoLogger.info( "resourceTemplateId:" + resourceTemplateId)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex){
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void prepareUpdateProgress(DelegateExecution execution) {
+ msoLogger.info(" ***** Started prepareUpdateProgress *****")
+ ResourceInput resourceInputObj = execution.getVariable(Prefix + "ResourceInput")
+ String operType = resourceInputObj.getOperationType()
+ String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+ String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+ String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+ String operationId = resourceInputObj.getOperationId()
+ String progress = execution.getVariable("progress")
+ String status = execution.getVariable("status")
+ String statusDescription = execution.getVariable("statusDescription")
+
+ String body = """
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:ns="http://org.openecomp.mso/requestsdb">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <ns:updateResourceOperationStatus>
+ <operType>${operType}</operType>
+ <operationId>${operationId}</operationId>
+ <progress>${progress}</progress>
+ <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
+ <serviceId>${ServiceInstanceId}</serviceId>
+ <status>${status}</status>
+ <statusDescription>${statusDescription}</statusDescription>
+ </ns:updateResourceOperationStatus>
+ </soapenv:Body>
+ </soapenv:Envelope>"""
+
+ setProgressUpdateVariables(execution, body)
+ msoLogger.info(" ***** End prepareUpdateProgress *****")
+ }
+
+ public void prepare3rdONAPRequest(DelegateExecution execution) {
+ msoLogger.info(" ***** Started prepare3rdONAPRequest *****")
+
+ String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
+ String extAPIPath = sppartnerUrl + 'serviceOrder'
+ execution.setVariable("ExternalAPIURL", extAPIPath)
+
+ // ExternalAPI message format
+ String externalId = execution.getVariable("resourceName")
+ String category = "E2E Service"
+ String description = "Service Order from SPPartner"
+ String requestedStartDate = utils.generateCurrentTimeInUtc()
+ String requestedCompletionDate = utils.generateCurrentTimeInUtc()
+ String priority = "1" // 0-4 0:highest
+ String subscriberId = execution.getVariable("globalSubscriberId")
+ String customerRole = ""
+ String subscriberName = ""
+ String referredType = "Consumer"
+ String orderItemId = "1"
+ String action = "delete" //for delete
+ String serviceState = "active"
+ String serviceName = ""
+ String serviceType = execution.getVariable("serviceType")
+ String serviceId = execution.getVariable(Prefix + "SppartnerId")
+
+ queryServicefrom3rdONAP(execution)
+ String serviceUuId = execution.getVariable(Prefix + "serviceSpecificationId")
+
+ Map<String, String> valueMap = new HashMap<>()
+ valueMap.put("externalId", '"' + externalId + '"')
+ valueMap.put("category", '"' + category + '"')
+ valueMap.put("description", '"' + description + '"')
+ valueMap.put("requestedStartDate", '"' + requestedStartDate + '"')
+ valueMap.put("requestedCompletionDate", '"' + requestedCompletionDate + '"')
+ valueMap.put("priority", '"'+ priority + '"')
+ valueMap.put("subscriberId", '"' + subscriberId + '"')
+ valueMap.put("customerRole", '"' + customerRole + '"')
+ valueMap.put("subscriberName", '"' + subscriberName + '"')
+ valueMap.put("referredType", '"' + referredType + '"')
+ valueMap.put("orderItemId", '"' + orderItemId + '"')
+ valueMap.put("action", '"' + action + '"')
+ valueMap.put("serviceState", '"' + serviceState + '"')
+ valueMap.put("serviceId", '"' + serviceId + '"')
+ valueMap.put("serviceName", '"' + serviceName + '"')
+ valueMap.put("serviceType", '"' + serviceType + '"')
+ valueMap.put("serviceUuId", '"' + serviceUuId + '"')
+
+ ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
+
+ valueMap.put("_requestInputs_", "")
+
+ String payload = externalAPIUtil.setTemplate(ExternalAPIUtil.PostServiceOrderRequestsTemplate, valueMap)
+ execution.setVariable(Prefix + "Payload", payload)
+ msoLogger.info( "Exit " + prepare3rdONAPRequest)
+ }
+
+ private void queryServicefrom3rdONAP(DelegateExecution execution)
+ {
+ msoLogger.info(" ***** Started queryServicefrom3rdONAP *****")
+
+ //https://{api_url}/nbi/api/v1/service/{serviceinstanceid}
+ String sppartnerUrl = execution.getVariable(Prefix + "SppartnerUrl")
+ String extAPIPath = sppartnerUrl + "service/" + execution.setVariable(Prefix + "SppartnerId")
+
+ ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
+
+ APIResponse response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
+
+ int responseCode = response.getStatusCode()
+ execution.setVariable(Prefix + "getServiceResponseCode", responseCode)
+ utils.log("DEBUG", "Get Service response code is: " + responseCode)
+
+ String extApiResponse = response.getResponseBodyAsString()
+ JSONObject responseObj = new JSONObject(extApiResponse)
+ execution.setVariable(Prefix + "getServiceResponse", extApiResponse)
+
+ //Process Response //200 OK 201 CREATED 202 ACCEPTED
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ {
+ utils.log("DEBUG", "Get Service Received a Good Response")
+ String serviceUuid = responseObj.get("serviceSpecification.id")
+ execution.setVariable(Prefix + "serviceSpecificationId", serviceUuid)
+ }
+ else{
+ utils.log("DEBUG", "Get Service Received a Bad Response Code. Response Code is: " + responseCode)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get Service Received a bad response from 3rdONAP External API")
+ }
+
+ msoLogger.info( "Exit " + queryServicefrom3rdONAP)
+ }
+
+ public void doDeleteE2ESIin3rdONAP(DelegateExecution execution) {
+ msoLogger.info(" ***** Started doDeleteE2ESIin3rdONAP *****")
+
+ String extAPIPath = execution.getVariable("ExternalAPIURL")
+ String payload = execution.getVariable(Prefix + "Payload")
+
+ ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
+
+ APIResponse response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
+
+ int responseCode = response.getStatusCode()
+ execution.setVariable(Prefix + "postServiceOrderResponseCode", responseCode)
+ msoLogger.debug("Post ServiceOrder response code is: " + responseCode)
+
+ String extApiResponse = response.getResponseBodyAsString()
+ JSONObject responseObj = new JSONObject(extApiResponse)
+ execution.setVariable(Prefix + "postServiceOrderResponse", extApiResponse)
+ //Process Response
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ //200 OK 201 CREATED 202 ACCEPTED
+ {
+ msoLogger.debug("Post ServiceOrder Received a Good Response")
+ String serviceOrderId = responseObj.get("ServiceOrderId")
+ execution.setVariable(Prefix + "SuccessIndicator", true)
+ execution.setVariable("serviceOrderId", serviceOrderId)
+ }
+ else{
+ msoLogger.debug("Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API")
+ }
+
+ msoLogger.info( "Exit " + doDeleteE2ESIin3rdONAP)
+ }
+
+
+ public void getE2ESIProgressin3rdONAP(DelegateExecution execution) {
+ msoLogger.info(" ***** Started getE2ESIProgressin3rdONAP *****")
+
+ String extAPIPath = execution.getVariable("ExternalAPIURL")
+ extAPIPath += "/" + execution.getVariable("ServiceOrderId")
+
+ ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this)
+
+ APIResponse response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
+
+ int responseCode = response.getStatusCode()
+ execution.setVariable(Prefix + "getServiceOrderResponseCode", responseCode)
+ msoLogger.debug("Get ServiceOrder response code is: " + responseCode)
+
+ String extApiResponse = response.getResponseBodyAsString()
+ JSONObject responseObj = new JSONObject(extApiResponse)
+ execution.setVariable(Prefix + "getServiceOrderResponse", extApiResponse)
+
+ //Process Response //200 OK 201 CREATED 202 ACCEPTED
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ {
+ msoLogger.debug("Get ServiceOrder Received a Good Response")
+ String serviceOrderState = responseObj.get("State")
+ execution.setVariable(Prefix + "SuccessIndicator", true)
+ execution.setVariable("serviceOrderState", serviceOrderState)
+
+ // Get serviceOrder State and process progress
+ if("ACKNOWLEDGED".equalsIgnoreCase(serviceOrderState)) {
+ execution.setVariable("progress", 15)
+ execution.setVariable("status", "processing")
+ }
+ if("INPROGRESS".equalsIgnoreCase(serviceOrderState)) {
+ execution.setVariable("progress", 40)
+ execution.setVariable("status", "processing")
+ }
+ if("COMPLETED".equalsIgnoreCase(serviceOrderState)) {
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "finished")
+ }
+ if("FAILED".equalsIgnoreCase(serviceOrderState)) {
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "error")
+ }
+ else {
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "error")
+ execution.setVariable("statusDescription", "Delete Service Order Status is unknown")
+ }
+ execution.setVariable("statusDescription", "Delete Service Order Status is " + serviceOrderState)
+ }
+ else{
+ msoLogger.debug("Get ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode)
+ execution.setVariable("progress", 100)
+ execution.setVariable("status", "error")
+ execution.setVariable("statusDescription", "Get ServiceOrder Received a bad response")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get ServiceOrder Received a bad response from 3rdONAP External API")
+ }
+
+ msoLogger.info( "Exit " + getE2ESIProgressin3rdONAP)
+ }
+
+ /**
+ * delay 5 sec
+ */
+ public void timeDelay(DelegateExecution execution) {
+ try {
+ Thread.sleep(5000)
+ } catch(InterruptedException e) {
+ utils.log("ERROR", "Time Delay exception" + e )
+ }
+ }
+
+ private void getSPPartnerInAAI(DelegateExecution execution) {
+ msoLogger.info(" ***** Started postDeleteE2ESIin3rdONAP *****")
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String serviceAaiPath = execution.getVariable(Prefix + "serviceAaiPath")
+ APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceAaiPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable(Prefix + "GetSppartnerResponseCode", responseCode)
+ msoLogger.debug(" Get sppartner response code is: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ aaiResponse = aaiResponse.replaceAll("&", "&amp;")
+ execution.setVariable(Prefix + "GetSppartnerResponse", aaiResponse)
+
+ //Process Response
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ //200 OK 201 CREATED 202 ACCEPTED
+ {
+ msoLogger.debug("GET sppartner Received a Good Response")
+ execution.setVariable(Prefix + "SuccessIndicator", true)
+ execution.setVariable(Prefix + "FoundIndicator", true)
+
+ String sppartnerId = utils.getNodeText1(aaiResponse, "sppartner-id")
+ execution.setVariable(Prefix + "SppartnerId", sppartnerId)
+ msoLogger.debug(" SppartnerId is: " + sppartnerId)
+ String sppartnerUrl = utils.getNodeText1(aaiResponse, "sppartner-url")
+ execution.setVariable(Prefix + "SppartnerUrl", sppartnerUrl)
+ msoLogger.debug(" SppartnerUrl is: " + sppartnerUrl)
+ String callSource = utils.getNodeText1(aaiResponse, "sppartner-callsource")
+ execution.setVariable(Prefix + "CallSource", callSource)
+ msoLogger.debug(" CallSource is: " + callSource)
+ String sppartnerVersion = utils.getNodeText1(aaiResponse, "resource-version")
+ execution.setVariable(Prefix + "SppartnerVersion", sppartnerVersion)
+ msoLogger.debug(" Resource Version is: " + sppartnerVersion)
+ }
+ else
+ {
+ msoLogger.debug("Get sppartner Received a Bad Response Code. Response Code is: " + responseCode)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ msoLogger.info( "Exit " + deleteSPPartnerInAAI)
+ }
+
+ public void deleteSPPartnerInAAI(DelegateExecution execution) {
+ msoLogger.info(" ***** Started postDeleteE2ESIin3rdONAP *****")
+
+ String sppartnerId = execution.getVariable(Prefix + "SppartnerId")
+ String sppartnerUrl = execution.getVariable(Prefix + "sppartnerUrl")
+ String sppartnerVersion = execution.getVariable(Prefix + "sppartnerVersion")
+
+ AaiUtil aaiUriUtil = new AaiUtil(this)
+ String serviceAaiPath = execution.getVariable(Prefix + "serviceAaiPath") + "?resource-version=${sppartnerVersion}"
+ APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, serviceAaiPath)
+ int responseCode = response.getStatusCode()
+ execution.setVariable(Prefix + "DeleteSppartnerResponseCode", responseCode)
+ msoLogger.debug(" Get sppartner response code is: " + responseCode)
+
+ String aaiResponse = response.getResponseBodyAsString()
+ aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
+ execution.setVariable(Prefix + "DeleteSppartnerResponse", aaiResponse)
+
+ //Process Response
+ if(responseCode == 200 || responseCode == 201 || responseCode == 202 )
+ //200 OK 201 CREATED 202 ACCEPTED
+ {
+ msoLogger.debug("Delete sppartner Received a Good Response")
+ execution.setVariable(Prefix + "SuccessIndicator", true)
+ }
+ else if(responseCode == 404){
+ msoLogger.debug(" Delete sppartner Received a Not Found (404) Response")
+ execution.setVariable(Prefix + "FoundIndicator", false)
+ }
+ else
+ {
+ msoLogger.debug("Delete sppartner Received a Bad Response Code. Response Code is: " + responseCode)
+ exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ msoLogger.info( "Exit " + deleteSPPartnerInAAI)
+ }
+
+ private void setProgressUpdateVariables(DelegateExecution execution, String body) {
+ def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+ execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+ execution.setVariable("CVFMI_updateResOperStatusRequest", body)
+ }
+
+ public void postProcess(DelegateExecution execution){
+ msoLogger.info(" ***** Started postProcess *****")
+ String responseCode = execution.getVariable(Prefix + "putSppartnerResponseCode")
+ String responseObj = execution.getVariable(Prefix + "putSppartnerResponse")
+
+ msoLogger.info("response from AAI for put sppartner, response code :" + responseCode + " response object :" + responseObj)
+ msoLogger.info(" ***** Exit postProcess *****")
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ msoLogger.debug(" *** sendSyncResponse *** ")
+
+ try {
+ String operationStatus = "finished"
+ // RESTResponse for main flow
+ String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+ msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ sendWorkflowResponse(execution, 202, resourceOperationResp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
index cbbc5189f4..cbbc5189f4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
new file mode 100644
index 0000000000..5a21fd7396
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteDeviceResource.groovy
@@ -0,0 +1,194 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - 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.onap.so.bpmn.infrastructure.scripts
+
+import org.json.JSONObject
+import org.json.XML;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.recipe.ResourceInput;
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.logger.MsoLogger
+import org.onap.so.rest.APIResponse
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+
+import java.util.UUID;
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils
+import org.onap.so.rest.RESTClient
+import org.onap.so.rest.RESTConfig
+import org.onap.so.rest.APIResponse;
+import org.onap.so.bpmn.common.scripts.AaiUtil
+
+/**
+ * This groovy class supports the <class>CreateDeviceResource.bpmn</class> process.
+ * flow for Device Resource Create
+ */
+public class DeleteDeviceResource extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELDEVRES_"
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+ JsonUtils jsonUtil = new JsonUtils()
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DeleteDeviceResource.class)
+
+ public void preProcessRequest(DelegateExecution execution){
+ msoLogger.info(" ***** Started preProcessRequest *****")
+ try {
+
+ //get bpmn inputs from resource request.
+ String requestId = execution.getVariable("mso-request-id")
+ String requestAction = execution.getVariable("requestAction")
+ msoLogger.info("The requestAction is: " + requestAction)
+ String recipeParamsFromRequest = execution.getVariable("recipeParams")
+ msoLogger.info("The recipeParams is: " + recipeParamsFromRequest)
+ String resourceInput = execution.getVariable("resourceInput")
+ msoLogger.info("The resourceInput is: " + resourceInput)
+ //Get ResourceInput Object
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ String resourceInputPrameters = resourceInputObj.getResourceParameters()
+ String inputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+ JSONObject inputParameters = new JSONObject(customizeResourceParam(inputParametersJson))
+ execution.setVariable(Prefix + "resourceRequestInputs", inputParameters)
+
+ //Deal with recipeParams
+ String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
+ String resourceName = resourceInputObj.getResourceInstanceName()
+ //For sdnc requestAction default is "createNetworkInstance"
+ String operationType = "Network"
+ if(!StringUtils.isBlank(recipeParamsFromRequest)){
+ //the operationType from worflow(first node) is second priority.
+ operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
+ }
+ if(!StringUtils.isBlank(recipeParamsFromWf)){
+ //the operationType from worflow(first node) is highest priority.
+ operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
+ }
+
+ execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
+ execution.setVariable("mso-request-id", requestId)
+
+ } catch (BpmnError e) {
+ throw e;
+ } catch (Exception ex){
+ String msg = "Exception in preProcessRequest " + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ String customizeResourceParam(String networkInputParametersJson) {
+ List<Map<String, Object>> paramList = new ArrayList();
+ JSONObject jsonObject = new JSONObject(networkInputParametersJson);
+ Iterator iterator = jsonObject.keys();
+ while (iterator.hasNext()) {
+ String key = iterator.next();
+ HashMap<String, String> hashMap = new HashMap();
+ hashMap.put("name", key);
+ hashMap.put("value", jsonObject.get(key))
+ paramList.add(hashMap)
+ }
+ Map<String, List<Map<String, Object>>> paramMap = new HashMap();
+ paramMap.put("param", paramList);
+
+ return new JSONObject(paramMap).toString();
+ }
+
+ public void checkDevType(DelegateExecution execution){
+ utils.log("INFO"," ***** Started checkDevType *****")
+ try {
+
+ JSONObject inputParameters = execution.getVariable(Prefix + "resourceRequestInputs")
+
+ String devType = inputParameters.get("device_class")
+
+ if(StringUtils.isBlank(devType)) {
+ devType = "OTHER"
+ }
+
+ execution.setVariable("device_class", devType)
+
+ } catch (Exception ex){
+ String msg = "Exception in checkDevType " + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void getVNFTemplatefromSDC(DelegateExecution execution){
+ utils.log("INFO"," ***** Started getVNFTemplatefromSDC *****")
+ try {
+ // To do
+
+
+ } catch (Exception ex){
+ String msg = "Exception in getVNFTemplatefromSDC " + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void postVNFInfoProcess(DelegateExecution execution){
+ utils.log("INFO"," ***** Started postVNFInfoProcess *****")
+ try {
+ // To do
+
+
+ } catch (Exception ex){
+ String msg = "Exception in postVNFInfoProcess " + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ msoLogger.debug( " *** sendSyncResponse *** ")
+
+ try {
+ String operationStatus = "finished"
+ // RESTResponse for main flow
+ String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+ msoLogger.debug( " sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+ sendWorkflowResponse(execution, 202, resourceOperationResp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ msoLogger.debug( msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.debug(" ***** Exit sendSyncResopnse *****")
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
index b43a96bdb0..b43a96bdb0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericALaCarteServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
index 816ba859ee..816ba859ee 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index a18cee253e..04b62d7f73 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -145,8 +145,136 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
- String sndcTopologyDeleteRequest =
- """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String sndcTopologyDeleteRequest = ""
+
+ switch (modelName) {
+ case ~/^Site$/:
+ sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <subscriber-name></subscriber-name>
+ </service-information>
+ <vnf-information>
+ <!-- TODO: to be filled as per the request input -->
+ <vnf-id></vnf-id>
+ <vnf-type></vnf-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </vnf-information>
+ <vnf-request-input>
+ <request-version></request-version>
+ <vnf-name></vnf-name>
+ <vnf-networks>
+ <vnf-network>
+ <network-role></network-role>
+ <network-name></network-name>
+ <neutron-id></neutron-id>
+ <network-id></network-id>
+ <contrail-network-fqdn></contrail-network-fqdn>
+ <subnets-data>
+ <subnet-data>
+ <ip-version></ip-version>
+ <subnet-id></subnet-id>
+ </subnet-data>
+ </subnets-data>
+ </vnf-network>
+ </vnf-networks>
+ </vnf-request-input>
+ <vnf-input-parameters>
+ <param></param>
+ </vnf-input-parameters>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ case ~/^SOTNAttachment$/:
+ sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
+ xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+ <sdncadapter:RequestHeader>
+ <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
+ <sdncadapter:SvcInstanceId>${MsoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
+ <sdncadapter:SvcAction>${MsoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
+ <sdncadapter:SvcOperation>network-topology-operation</sdncadapter:SvcOperation>
+ <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+ <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+ </sdncadapter:RequestHeader>
+ <sdncadapterworkflow:SDNCRequestData>
+ <request-information>
+ <request-id>${MsoUtils.xmlEscape(hdrRequestId)}</request-id>
+ <request-action>${MsoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+ <source>${MsoUtils.xmlEscape(source)}</source>
+ <notification-url></notification-url>
+ <order-number></order-number>
+ <order-version></order-version>
+ </request-information>
+ <service-information>
+ <service-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-id>
+ <subscription-service-type>${MsoUtils.xmlEscape(serviceType)}</subscription-service-type>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(serviceModelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(serviceModelName)}</model-name>
+ </onap-model-information>
+ <service-instance-id>${MsoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+ <global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+ <subscriber-name></subscriber-name>
+ </service-information>
+ <allotted-resource-information>
+ <allotted-resource-id></allotted-resource-id>
+ <allotted-resource-type></allotted-resource-type>
+ <parent-service-instance-id></parent-service-instance-id>
+ <onap-model-information>
+ <model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+ <model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+ <model-uuid>${MsoUtils.xmlEscape(modelUuid)}</model-uuid>
+ <model-version>${MsoUtils.xmlEscape(modelVersion)}</model-version>
+ <model-name>${MsoUtils.xmlEscape(modelName)}</model-name>
+ </onap-model-information>
+ </allotted-resource-information>
+ <connection-attachment-request-input>
+ <param></param>
+ </connection-attachment-request-input>
+ </sdncadapterworkflow:SDNCRequestData>
+ </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+ break
+
+ default:
+ sndcTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapter:RequestHeader>
@@ -179,6 +307,8 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
<global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
</service-information>
<network-information>
+ <!-- TODO: to be filled as per the request input -->
+ <network-id></network-id>
<onap-model-information>
<model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
<model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
@@ -192,7 +322,8 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
</network-request-input>
</sdncadapterworkflow:SDNCRequestData>
</aetgt:SDNCAdapterWorkflowRequest>""".trim()
-
+ }
+
String sndcTopologyDeleteRequesAsString = utils.formatXml(sndcTopologyDeleteRequest)
utils.logAudit(sndcTopologyDeleteRequesAsString)
execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyDeleteRequesAsString)
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
index 536783bc33..536783bc33 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
index 682421e806..682421e806 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index 2cbfeac239..2cbfeac239 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
index 9dfb9107b2..9dfb9107b2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVnfInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
index 98605fea8b..98605fea8b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
index eceba5abe3..3702862a04 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * 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.
@@ -20,47 +20,29 @@
package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
-import groovy.xml.XmlUtil
-import groovy.json.*
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.bpmn.core.domain.ServiceInstance
+import javax.ws.rs.NotFoundException
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.core.domain.CompareModelsResult
import org.onap.so.bpmn.core.domain.ModelInfo
import org.onap.so.bpmn.core.domain.Resource
-import org.onap.so.bpmn.core.domain.CompareModelsResult
import org.onap.so.bpmn.core.domain.ResourceModelInfo
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.common.scripts.AaiUtil
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.rest.APIResponse;
-import org.onap.so.rest.RESTClient
-import org.onap.so.rest.RESTConfig
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import groovy.json.*
-import java.util.List
-import java.util.Map
-import java.util.UUID;
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-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 org.w3c.dom.Document
-import org.w3c.dom.Element
-import org.w3c.dom.Node
-import org.w3c.dom.NodeList
-import org.xml.sax.InputSource
/**
* This groovy class supports the <class>DoCompareModelofE2EServiceInstance.bpmn</class> process.
*
@@ -80,7 +62,7 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
String Prefix="DCMPMDSI_"
private static final String DebugFlag = "isDebugEnabled"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -94,11 +76,11 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
execution.setVariable("prefix", Prefix)
//Inputs
-
+
//subscriberInfo. for AAI GET
String globalSubscriberId = execution.getVariable("globalSubscriberId")
utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
-
+
String serviceType = execution.getVariable("serviceType")
utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
@@ -142,85 +124,48 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
utils.log("INFO", "Exited " + method, isDebugEnabled)
}
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
+ /**
+ * Gets the service instance from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI){
- utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
-
- String siData = execution.getVariable("GENGS_service")
- utils.log("INFO", "SI Data", isDebugEnabled)
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- else
- {
- utils.log("INFO", "SI Data" + siData, isDebugEnabled)
-
- // Get Template uuid and version
- if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
- utils.log("INFO", "SI Data model-invariant-id and model-version-id exist", isDebugEnabled)
-
- def modelInvariantId = utils.getNodeText(siData, "model-invariant-id")
- def modelVersionId = utils.getNodeText(siData, "model-version-id")
-
- // Set Original Template info
- execution.setVariable("model-invariant-id-original", modelInvariantId)
- execution.setVariable("model-version-id-original", modelVersionId)
- }
- }
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
- }
- }catch (BpmnError e) {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("model-invariant-id-original", si.getModelInvariantId())
+ execution.setVariable("model-version-id-original", si.getModelVersionId())
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
+ }catch(NotFoundException e) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service-instance does not exist AAI")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.trace("Exit postProcessAAIGET ")
}
public void postCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
+
List<Resource> addResourceList = execution.getVariable("addResourceList")
List<Resource> delResourceList = execution.getVariable("delResourceList")
-
+
CompareModelsResult cmpResult = new CompareModelsResult()
List<ResourceModelInfo> addedResourceList = new ArrayList<ResourceModelInfo>()
List<ResourceModelInfo> deletedResourceList = new ArrayList<ResourceModelInfo>()
-
-
+
+
String serviceModelUuid = execution.getVariable("model-version-id-target")
List<String> requestInputs = new ArrayList<String>()
ModelInfo mi = null;
@@ -233,11 +178,11 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
rmodel.setResourceUuid(mi.getModelUuid())
rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
addedResourceList.add(rmodel)
-
+
Map<String, Object> resourceParameters = ResourceRequestBuilder.buildResouceRequest(serviceModelUuid, resourceCustomizationUuid, null)
- requestInputs.addAll(resourceParameters.keySet())
+ requestInputs.addAll(resourceParameters.keySet())
}
-
+
for(Resource rc : delResourceList) {
mi = rc.getModelInfo()
String resourceCustomizationUuid = mi.getModelCustomizationUuid()
@@ -246,15 +191,15 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
rmodel.setResourceInvariantUuid(mi.getModelInvariantUuid())
rmodel.setResourceUuid(mi.getModelUuid())
rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
- deletedResourceList.add(rmodel)
+ deletedResourceList.add(rmodel)
}
-
+
cmpResult.setAddedResourceList(addedResourceList)
cmpResult.setDeletedResourceList(deletedResourceList)
- cmpResult.setRequestInputs(requestInputs)
+ cmpResult.setRequestInputs(requestInputs)
execution.setVariable("compareModelsResult", cmpResult)
}
-
+
}
-
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index bb48671e73..4939173d65 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -3,14 +3,14 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * Copyright (C) 2017 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.
@@ -22,9 +22,12 @@ package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import javax.ws.rs.NotFoundException
+
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.CatalogDbUtils;
@@ -35,6 +38,11 @@ import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
@@ -58,7 +66,7 @@ import groovy.json.*
* @param - failExists - TODO
* @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
* @param - sdncVersion ("1610")
- * @param - serviceDecomposition - Decomposition for R1710
+ * @param - serviceDecomposition - Decomposition for R1710
* (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
*
* Outputs:
@@ -98,17 +106,17 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(serviceType)) {
msg = "Input serviceType is null"
msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (productFamilyId == null) {
execution.setVariable("productFamilyId", "")
}
-
+
String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
if (isBlank(sdncCallbackUrl)) {
msg = "URN_mso_workflow_sdncadapter_callback is null"
@@ -118,8 +126,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
msoLogger.info("SDNC Callback URL: " + sdncCallbackUrl)
- //requestDetails.modelInfo.for AAI PUT servieInstanceData
- //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
+ //requestDetails.modelInfo.for AAI PUT servieInstanceData
+ //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String uuiRequest = execution.getVariable("uuiRequest")
@@ -130,7 +138,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
//aai serviceType and Role can be setted as fixed value now.
String aaiServiceType = "E2E Service"
String aaiServiceRole = "E2E Service"
-
+
execution.setVariable("modelInvariantUuid", modelInvariantUuid)
execution.setVariable("modelUuid", modelUuid)
@@ -142,7 +150,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${MsoUtils.xmlEscape(oStatus)}</orchestration-status>"
-
+
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
@@ -155,7 +163,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
${statusLine}
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
<model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
- </service-instance>""".trim()
+ </service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
msoLogger.debug(serviceInstanceData)
msoLogger.info(" aai_uri " + aai_uri + " namespace:" + namespace)
@@ -170,7 +178,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit preProcessRequest ")
}
-
+
public void prepareDecomposeService(DelegateExecution execution) {
try {
msoLogger.trace("Inside prepareDecomposeService of create generic e2e service ")
@@ -193,7 +201,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
public void processDecomposition(DelegateExecution execution) {
- msoLogger.trace("Inside processDecomposition() of create generic e2e service flow ")
+ msoLogger.trace("Inside processDecomposition() of create generic e2e service flow ")
try {
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
} catch (Exception ex) {
@@ -202,23 +210,23 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
}
-
+
public void doServicePreOperation(DelegateExecution execution){
- //we need a service plugin platform here.
+ //we need a service plugin platform here.
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- String uuiRequest = execution.getVariable("uuiRequest")
+ String uuiRequest = execution.getVariable("uuiRequest")
String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest);
- execution.setVariable("uuiRequest", newUuiRequest)
+ execution.setVariable("uuiRequest", newUuiRequest)
}
-
+
public void doServiceHoming(DelegateExecution execution) {
- //we need a service plugin platform here.
+ //we need a service plugin platform here.
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- String uuiRequest = execution.getVariable("uuiRequest")
+ String uuiRequest = execution.getVariable("uuiRequest")
String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest);
- execution.setVariable("uuiRequest", newUuiRequest)
+ execution.setVariable("uuiRequest", newUuiRequest)
}
-
+
public void postProcessAAIGET(DelegateExecution execution) {
msoLogger.trace("postProcessAAIGET ")
String msg = ""
@@ -260,6 +268,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit postProcessAAIGET ")
}
+ //TODO use create if not exist
public void postProcessAAIPUT(DelegateExecution execution) {
msoLogger.trace("postProcessAAIPUT ")
String msg = ""
@@ -296,7 +305,32 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessAAIPUT ")
}
-
+
+ /**
+ * Gets the service instance and its relationships from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('subscriptionServiceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("serviceInstanceName", si.getServiceInstanceName())
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+
public void postProcessAAIGET2(DelegateExecution execution) {
msoLogger.trace("postProcessAAIGET2 ")
String msg = ""
@@ -342,7 +376,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
public void preProcessRollback (DelegateExecution execution) {
msoLogger.trace("preProcessRollback ")
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -397,10 +431,10 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("operationType", operationType)
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> resourceList = serviceDecomposition.getServiceResources()
-
+
for(Resource resource : resourceList){
resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
- }
+ }
def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
@@ -429,23 +463,36 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preInitResourcesOperStatus.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
}
- msoLogger.trace("COMPLETED preInitResourcesOperStatus Process ")
+ msoLogger.trace("COMPLETED preInitResourcesOperStatus Process ")
+ }
+
+ // if site location is in local Operator, create all resources in local ONAP;
+ // if site location is in 3rd Operator, only process sp-partner to create all resources in 3rd ONAP
+ public void doProcessSiteLocation(DelegateExecution execution){
+
+ msoLogger.trace("======== Start doProcessSiteLocation Process ======== ")
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ String uuiRequest = execution.getVariable("uuiRequest")
+ ServiceDecomposition serviceDecompositionforLocal = ServicePluginFactory.getInstance().doProcessSiteLocation(serviceDecomposition, uuiRequest);
+ execution.setVariable("serviceDecomposition", serviceDecompositionforLocal)
+
+ msoLogger.trace("======== COMPLETED doProcessSiteLocation Process ======== ")
}
// prepare input param for using DoCreateResources.bpmn
public void preProcessForAddResource(DelegateExecution execution) {
msoLogger.trace("STARTED preProcessForAddResource Process ")
-
+
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> addResourceList = serviceDecomposition.getServiceResources()
execution.setVariable("addResourceList", addResourceList)
-
+
msoLogger.trace("COMPLETED preProcessForAddResource Process ")
}
public void postProcessForAddResource(DelegateExecution execution) {
// do nothing now
-
+
}
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
index 05a0ea86d3..82355beed2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceRollback.groovy
@@ -37,7 +37,7 @@ import org.onap.so.rest.RESTClient
import org.onap.so.rest.RESTConfig
import org.onap.so.logger.MsoLogger
import org.onap.so.logger.MessageEnum
-
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.aai.AAIObjectType
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
index 4bbaef8ecb..a376e581fe 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -36,6 +36,14 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse;
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
import groovy.json.*
import groovy.xml.XmlUtil
@@ -47,7 +55,7 @@ import groovy.xml.XmlUtil
*/
public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateNetworkInstance.class);
-
+
String Prefix="CRENWKI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -56,7 +64,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
def className = getClass().getSimpleName()
-
+
/**
* This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstance.bpmn</class> process.
* @param execution
@@ -78,7 +86,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "networkOutputs", "")
execution.setVariable(Prefix + "networkId","")
execution.setVariable(Prefix + "networkName","")
-
+
// AAI query Name
execution.setVariable(Prefix + "queryNameAAIRequest","")
execution.setVariable(Prefix + "queryNameAAIResponse", "")
@@ -149,7 +157,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
//execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
execution.setVariable(Prefix + "isSdncRollbackNeeded", false)
execution.setVariable(Prefix + "sdncResponseSuccess", false)
-
+
execution.setVariable(Prefix + "activateSDNCRequest", "")
execution.setVariable(Prefix + "activateSDNCResponse", "")
execution.setVariable(Prefix + "rollbackActivateSDNCRequest", "")
@@ -164,7 +172,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "Success", false)
execution.setVariable(Prefix + "isException", false)
-
+
}
// **************************************************
@@ -175,25 +183,25 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
* @param execution
*/
public void preProcessRequest (DelegateExecution execution) {
-
- execution.setVariable("prefix",Prefix)
+
+ execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside preProcessRequest() of " + className + ".groovy")
-
+
try {
// initialize flow variables
InitializeProcessVariables(execution)
-
+
// GET Incoming request & validate 3 kinds of format.
execution.setVariable("action", "CREATE")
String networkRequest = execution.getVariable("bpmnRequest")
if (networkRequest != null) {
if (networkRequest.contains("requestDetails")) {
- // JSON format request is sent, create xml
+ // JSON format request is sent, create xml
try {
def prettyJson = JsonOutput.prettyPrint(networkRequest.toString())
msoLogger.debug(" Incoming message formatted . . . : " + '\n' + prettyJson)
networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
-
+
} catch (Exception ex) {
String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
@@ -201,26 +209,26 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
} else {
// XML format request is sent
-
+
}
} else {
// vIPR format request is sent, create xml from individual variables
networkRequest = vidUtils.createXmlNetworkRequestInstance(execution)
}
-
+
networkRequest = utils.formatXml(networkRequest)
execution.setVariable(Prefix + "networkRequest", networkRequest)
msoLogger.debug(Prefix + "networkRequest - " + '\n' + networkRequest)
-
+
// validate 'backout-on-failure' to override 'mso.rollback'
boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
msoLogger.debug(Prefix + "rollbackEnabled - " + rollbackEnabled)
-
+
String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
execution.setVariable(Prefix + "networkInputs", networkInputs)
msoLogger.debug(Prefix + "networkInputs - " + '\n' + networkInputs)
-
+
// prepare messageId
String messageId = execution.getVariable("testMessageId") // for testing
if (messageId == null || messageId == "") {
@@ -230,12 +238,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "messageId, pre-assigned: " + messageId)
}
execution.setVariable(Prefix + "messageId", messageId)
-
+
String source = utils.getNodeText(networkRequest, "source")
execution.setVariable(Prefix + "source", source)
msoLogger.debug(Prefix + "source - " + source)
-
- // validate cloud region
+
+ // validate cloud region
String lcpCloudRegionId = utils.getNodeText(networkRequest, "aic-cloud-region")
if ((lcpCloudRegionId == null) || (lcpCloudRegionId == "") || (lcpCloudRegionId == "null")) {
String dataErrorMessage = "Missing value/element: 'lcpCloudRegionId' or 'cloudConfiguration' or 'aic-cloud-region'."
@@ -244,7 +252,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
// validate service instance id
- String serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
+ String serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
if ((serviceInstanceId == null) || (serviceInstanceId == "") || (serviceInstanceId == "null")) {
String dataErrorMessage = "Missing value/element: 'serviceInstanceId'."
msoLogger.debug(" Invalid Request - " + dataErrorMessage)
@@ -253,12 +261,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// PO Authorization Info / headers Authorization=
String basicAuthValuePO = UrnPropertiesReader.getVariable("mso.adapters.po.auth",execution)
-
+
try {
def encodedString = utils.getBasicAuth(basicAuthValuePO, UrnPropertiesReader.getVariable("mso.msoKey",execution))
execution.setVariable("BasicAuthHeaderValuePO",encodedString)
execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
+
} catch (IOException ex) {
String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - "
String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
@@ -273,11 +281,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable("GENGS_type", "service-instance")
msoLogger.debug("GENGS_type - " + "service-instance")
msoLogger.debug(" Url for SDNC adapter: " + UrnPropertiesReader.getVariable("mso.adapters.sdnc.endpoint",execution))
-
+
String sdncVersion = execution.getVariable("sdncVersion")
msoLogger.debug("sdncVersion? : " + sdncVersion)
-
- // build 'networkOutputs'
+
+ // build 'networkOutputs'
String networkId = utils.getNodeText(networkRequest, "network-id")
if ((networkId == null) || (networkId == "null")) {
networkId = ""
@@ -295,25 +303,49 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "networkOutputs - " + '\n' + networkOutputs)
execution.setVariable(Prefix + "networkId", networkId)
execution.setVariable(Prefix + "networkName", networkName)
-
+
} catch (BpmnError e) {
throw e;
-
+
} catch (Exception ex) {
sendSyncError(execution)
// caught exception
String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
+
}
}
-
+
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('CRENWKI_serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+
public void callRESTQueryAAINetworkName (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkName() of DoCreateNetworkInstance ***** " )
// get variables
@@ -348,7 +380,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus.toUpperCase())
msoLogger.debug(Prefix + "orchestrationStatus - " + orchestrationStatus.toUpperCase())
execution.setVariable("orchestrationStatus", orchestrationStatus)
-
+
} catch (Exception ex) {
// response is empty
execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus)
@@ -385,9 +417,9 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.debug(" ***** Inside callRESTQueryAAICloudRegion() of DoCreateNetworkInstance ***** " )
try {
@@ -434,7 +466,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkId(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
@@ -445,15 +477,15 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
if (execution.getVariable("sdncVersion") != "1610") {
String networkResponseInformation = ""
- try {
+ try {
networkResponseInformation = utils.getNodeXml(assignSDNCResponse, "network-response-information", false).replace("tag0:","").replace(":tag0","")
networkId = utils.getNodeText(networkResponseInformation, "instance-id")
} catch (Exception ex) {
String dataErrorMessage = " SNDC Response network validation for 'instance-id' (network-id) failed: Empty <network-response-information>"
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
+ }
+
} else {
networkId = utils.getNodeText(assignSDNCResponse, "network-id")
}
@@ -465,11 +497,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" SNDC Response network validation for 'instance-id' (network-id)' is good: " + networkId)
}
-
+
execution.setVariable(Prefix + "networkId", networkId)
String networkName = utils.getNodeText(assignSDNCResponse, "network-name")
execution.setVariable(Prefix + "networkName", networkName)
-
+
networkId = UriUtils.encode(networkId,"UTF-8")
// Prepare AA&I url
@@ -491,7 +523,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
if (returnCode=='200') {
execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
msoLogger.debug(" QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString)
-
+
String netId = utils.getNodeText(aaiResponseAsString, "network-id")
execution.setVariable(Prefix + "networkId", netId)
String netName = utils.getNodeText(aaiResponseAsString, "network-name")
@@ -532,7 +564,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTReQueryAAINetworkId(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTReQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
@@ -540,7 +572,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
try {
// get variables
String networkId = execution.getVariable(Prefix + "networkId")
- String netId = networkId
+ String netId = networkId
networkId = UriUtils.encode(networkId,"UTF-8")
// Prepare AA&I url
@@ -606,7 +638,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkVpnBinding(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkVpnBinding() of DoCreateNetworkInstance ***** " )
@@ -748,7 +780,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkPolicy(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkPolicy() of DoCreateNetworkInstance ***** " )
@@ -882,7 +914,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkTableRef(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkTableRef() of DoCreateNetworkInstance ***** " )
@@ -1017,7 +1049,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTUpdateContrailAAINetwork() of DoCreateNetworkInstance ***** " )
@@ -1046,7 +1078,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" 'payload' to Update Contrail - " + "\n" + payloadXml)
APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payloadXml)
-
+
String returnCode = response.getStatusCode()
execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
msoLogger.debug(" ***** AAI Update Contrail Response Code : " + returnCode)
@@ -1060,7 +1092,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "isPONR", false)
} else {
execution.setVariable(Prefix + "isPONR", true)
- }
+ }
msoLogger.debug(Prefix + "isPONR" + ": " + execution.getVariable(Prefix + "isPONR"))
} else {
if (returnCode=='404') {
@@ -1096,7 +1128,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareCreateNetworkRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareCreateNetworkRequest() of DoCreateNetworkInstance")
@@ -1106,7 +1138,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// get variables
String requestId = execution.getVariable("msoRequestId")
if (requestId == null) {
- requestId = execution.getVariable("mso-request-id")
+ requestId = execution.getVariable("mso-request-id")
}
String messageId = execution.getVariable(Prefix + "messageId")
String source = execution.getVariable(Prefix + "source")
@@ -1115,7 +1147,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String queryIdResponse = execution.getVariable(Prefix + "queryIdAAIResponse")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo")
String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
-
+
// Prepare Network request
String routeCollection = execution.getVariable(Prefix + "routeCollection")
String policyCollection = execution.getVariable(Prefix + "networkCollection")
@@ -1138,7 +1170,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareSDNCRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareSDNCRequest() of DoCreateNetworkInstance")
@@ -1158,9 +1190,9 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable("mso-request-id", requestId)
} else {
requestId = execution.getVariable("mso-request-id")
- }
+ }
execution.setVariable(Prefix + "requestId", requestId)
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
@@ -1179,21 +1211,21 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareRpcSDNCRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCRequest() of DoCreateNetworkInstance")
try {
// get variables
-
+
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
String networkId = execution.getVariable(Prefix + "networkId")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "CreateNetworkInstance", cloudRegionId, networkId, null)
@@ -1209,11 +1241,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRpcSDNCActivateRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRpcSDNCActivateRequest() of DoCreateNetworkInstance")
try {
@@ -1223,7 +1255,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
String networkId = execution.getVariable(Prefix + "networkId")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "activate", "CreateNetworkInstance", cloudRegionId, networkId, null)
@@ -1240,7 +1272,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
@@ -1249,7 +1281,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// **************************************************
public void validateCreateNetworkResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateNetworkResponse() of DoCreateNetworkInstance")
@@ -1321,7 +1353,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void validateSDNCResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateSDNCResponse() of DoCreateNetworkInstance")
@@ -1329,7 +1361,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String response = execution.getVariable(Prefix + "assignSDNCResponse")
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
-
+
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
@@ -1349,7 +1381,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void validateRpcSDNCActivateResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateRpcSDNCActivateResponse() of DoCreateNetworkInstance")
@@ -1373,12 +1405,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug("Did NOT Successfully Validated Rpc SDNC Activate Response")
throw new BpmnError("MSOWorkflowException")
}
-
+
}
public void prepareSDNCRollbackRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareSDNCRollbackRequest() of DoCreateNetworkInstance")
@@ -1392,7 +1424,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String networkId = execution.getVariable(Prefix + "networkId")
if (networkId == 'null') {networkId = ""}
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 2. prepare rollback topology via SDNC Adapter SUBFLOW call
String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
@@ -1410,7 +1442,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareRpcSDNCRollbackRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCRollbackRequest() of DoCreateNetworkInstance")
@@ -1440,15 +1472,15 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRpcSDNCActivateRollback(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCActivateRollback() of DoCreateNetworkInstance")
try {
-
+
// get variables
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
@@ -1473,76 +1505,76 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRollbackData(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRollbackData() of DoCreateNetworkInstance")
-
+
try {
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
- if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != null) {
if (rollbackSDNCRequest != "") {
rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
}
- }
+ }
String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
if (rollbackNetworkRequest != null) {
- if (rollbackNetworkRequest != "") {
+ if (rollbackNetworkRequest != "") {
rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
- }
+ }
}
String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
if (rollbackActivateSDNCRequest != null) {
- if (rollbackActivateSDNCRequest != "") {
+ if (rollbackActivateSDNCRequest != "") {
rollbackData.put("rollbackActivateSDNCRequest", execution.getVariable(Prefix + "rollbackActivateSDNCRequest"))
- }
+ }
}
execution.setVariable("rollbackData", rollbackData)
msoLogger.debug("** rollbackData : " + rollbackData)
-
+
execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
msoLogger.debug("** WorkflowException : " + execution.getVariable("WorkflowException"))
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void postProcessResponse(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside postProcessResponse() of DoCreateNetworkInstance")
-
+
try {
-
+
//Conditions:
- // 1. Silent Success: execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"
+ // 1. Silent Success: execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"
// 2. Success: execution.getVariable("WorkflowException") == null (NULL)
- // 3. WorkflowException: execution.getVariable("WorkflowException") != null (NOT NULL)
-
+ // 3. WorkflowException: execution.getVariable("WorkflowException") != null (NOT NULL)
+
msoLogger.debug(" ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"))
// successful flow
- if (execution.getVariable(Prefix + "isException") == false) {
+ if (execution.getVariable(Prefix + "isException") == false) {
// set rollback data
execution.setVariable("orchestrationStatus", "")
execution.setVariable("networkId", execution.getVariable(Prefix + "networkId"))
execution.setVariable("networkName", execution.getVariable(Prefix + "networkName"))
- prepareSuccessRollbackData(execution) // populate rollbackData
+ prepareSuccessRollbackData(execution) // populate rollbackData
execution.setVariable("WorkflowException", null)
execution.setVariable(Prefix + "Success", true)
msoLogger.debug(" ***** postProcessResponse(), GOOD !!!")
} else {
// inside sub-flow logic
- execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "Success", false)
execution.setVariable("rollbackData", null)
String exceptionMessage = " Exception encountered in MSO Bpmn. "
if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
@@ -1553,45 +1585,45 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
if (execution.getVariable(Prefix + "WorkflowException") != null) {
WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
exceptionMessage = pwfex.getErrorMessage()
- }
+ }
}
// going to the Main flow: a-la-carte or macro
msoLogger.debug(" ***** postProcessResponse(), BAD !!!")
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
}
-
+
} catch(BpmnError b){
msoLogger.debug("Rethrowing MSOWorkflowException")
throw b
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
-
+
}
-
-
-
+
+
+
}
-
+
public void prepareSuccessRollbackData(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareSuccessRollbackData() of DoCreateNetworkInstance")
-
+
try {
-
+
if (execution.getVariable("sdncVersion") != '1610') {
prepareRpcSDNCRollbackRequest(execution)
prepareRpcSDNCActivateRollback(execution)
} else {
prepareSDNCRollbackRequest(execution)
- }
-
+ }
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1612,63 +1644,63 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("** 'rollbackData' for Full Rollback : " + rollbackData)
execution.setVariable("WorkflowException", null)
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
public void setExceptionFlag(DelegateExecution execution){
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside setExceptionFlag() of DoCreateNetworkInstance")
-
+
try {
-
+
execution.setVariable(Prefix + "isException", true)
-
+
if (execution.getVariable("SavedWorkflowException1") != null) {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
} else {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
}
msoLogger.debug(Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"))
-
+
} catch(Exception ex){
String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
- }
-
+ }
+
}
-
-
+
+
// *******************************
// Build Error Section
// *******************************
-
+
public void processJavaException(DelegateExecution execution){
-
+
execution.setVariable("prefix",Prefix)
-
+
try{
msoLogger.debug( "Caught a Java Exception in " + Prefix)
msoLogger.debug("Started processJavaException Method")
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
index 7e00f05b90..7e00f05b90 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
index 9da8a90ca7..d571c00f47 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
*
@@ -183,9 +183,9 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
def currentIndex = execution.getVariable("currentResourceIndex")
List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
Resource currentResource = sequencedResourceList.get(currentIndex)
- execution.setVariable("resourceType", currentResource.getModelInfo().getModelName())
+ execution.setVariable("resourceType", currentResource.getModelInfo().getModelName())
msoLogger.info("Now we deal with resouce:" + currentResource.getModelInfo().getModelName())
- msoLogger.trace("COMPLETED getCurrentResoure Process ")
+ msoLogger.trace("COMPLETED getCurrentResoure Process ")
}
public void parseNextResource(DelegateExecution execution){
@@ -226,6 +226,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
resourceInput.setResourceModelInfo(currentResource.getModelInfo());
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
+ def String resourceCustomizationUuid = currentResource.getModelInfo().getModelCustomizationUuid();
String incomingRequest = execution.getVariable("uuiRequest")
//set the requestInputs from tempalte To Be Done
@@ -260,7 +261,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
} else {
String exceptionMessage = "Resource receipe is not found for resource modeluuid: " +
resourceInput.getResourceModelInfo().getModelUuid()
- utils.log("ERROR", exceptionMessage, isDebugEnabled)
+ msoLogger.trace(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, exceptionMessage)
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
index 93a260a544..b44940eb20 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -62,7 +62,7 @@ import groovy.json.*
* @param - failExists - TODO
* @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
* @param - sdncVersion ("1610")
- * @param - serviceDecomposition - Decomposition for R1710
+ * @param - serviceDecomposition - Decomposition for R1710
* (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
*
* Outputs:
@@ -71,7 +71,7 @@ import groovy.json.*
* @param - WorkflowException
* @param - serviceInstanceName - (GET from AAI if null in input)
*
- * This BB processes Macros(except TRANSPORT all sent to sdnc) and Alacartes(sdncSvcs && nonSdncSvcs)
+ * This BB processes Macros(except TRANSPORT all sent to sdnc) and Alacartes(sdncSvcs && nonSdncSvcs)
*/
public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
@@ -89,7 +89,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String requestId = execution.getVariable("msoRequestId")
execution.setVariable("prefix", Prefix)
-
+
setBasicDBAuthHeader(execution, isDebugEnabled)
//Inputs
//requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
@@ -106,17 +106,17 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(subscriptionServiceType)) {
msg = "Input subscriptionServiceType is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (productFamilyId == null) {
execution.setVariable("productFamilyId", "")
}
-
+
String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
if (isBlank(sdncCallbackUrl)) {
msg = "mso.workflow.sdncadapter.callback is null"
@@ -131,19 +131,19 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
String modelVersion = ""
String modelUuid = ""
String modelName = ""
- String serviceInstanceName = ""
+ String serviceInstanceName = ""
//Generated in parent.for AAI PUT
String serviceInstanceId = ""
String serviceType = ""
String serviceRole = ""
-
+
ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
if (serviceDecomp != null)
{
serviceType = serviceDecomp.getServiceType() ?: ""
msoLogger.debug("serviceType:" + serviceType)
serviceRole = serviceDecomp.getServiceRole() ?: ""
-
+
ServiceInstance serviceInstance = serviceDecomp.getServiceInstance()
if (serviceInstance != null)
{
@@ -152,7 +152,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("serviceInstanceId", serviceInstanceId)
execution.setVariable("serviceInstanceName", serviceInstanceName)
}
-
+
ModelInfo modelInfo = serviceDecomp.getModelInfo()
if (modelInfo != null)
{
@@ -161,7 +161,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
modelUuid = modelInfo.getModelUuid() ?: ""
modelName = modelInfo.getModelName() ?: ""
}
- else
+ else
{
msg = "Input serviceModelInfo is null"
msoLogger.debug(msg)
@@ -173,21 +173,21 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData & SDNC assignToplology
serviceInstanceName = execution.getVariable("serviceInstanceName") ?: ""
serviceInstanceId = execution.getVariable("serviceInstanceId") ?: ""
-
+
String serviceModelInfo = execution.getVariable("serviceModelInfo")
if (isBlank(serviceModelInfo)) {
msg = "Input serviceModelInfo is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ }
modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid") ?: ""
modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion") ?: ""
modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid") ?: ""
modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName") ?: ""
//modelCustomizationUuid NA for SI
-
+
}
-
+
execution.setVariable("serviceType", serviceType)
execution.setVariable("serviceRole", serviceRole)
execution.setVariable("serviceInstanceName", serviceInstanceName)
@@ -196,7 +196,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("modelVersion", modelVersion)
execution.setVariable("modelUuid", modelUuid)
execution.setVariable("modelName", modelName)
-
+
//alacarte SIs are NOT sent to sdnc. exceptions are listed in config variable
String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
msoLogger.debug("SDNC SI serviceTypes:" + svcTypes)
@@ -208,13 +208,13 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
break;
}
}
-
+
//All Macros are sent to SDNC, TRANSPORT(Macro) is sent to SDNW
//Alacartes are sent to SDNC if they are listed in config variable above
execution.setVariable("sendToSDNC", true)
if(execution.getVariable("sdncVersion").equals("1610")) //alacarte
{
- if(!isSdncService){
+ if(!isSdncService){
execution.setVariable("sendToSDNC", false)
//alacarte non-sdnc svcs must provide name (sdnc provides name for rest)
if (isBlank(execution.getVariable("serviceInstanceName" )))
@@ -225,25 +225,25 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
}
}
-
+
msoLogger.debug("isSdncService: " + isSdncService)
msoLogger.debug("Send To SDNC: " + execution.getVariable("sendToSDNC"))
msoLogger.debug("Service Type: " + execution.getVariable("serviceType"))
-
+
//macro may provide name and alacarte-portm may provide name
execution.setVariable("checkAAI", false)
if (!isBlank(execution.getVariable("serviceInstanceName" )))
{
execution.setVariable("checkAAI", true)
}
-
+
if (isBlank(serviceInstanceId)){
msg = "Input serviceInstanceId is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
-
+
+
StringBuilder sbParams = new StringBuilder()
Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
if (paramsMap != null)
@@ -278,16 +278,16 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${MsoUtils.xmlEscape(oStatus)}</orchestration-status>"
String serviceTypeLine = isBlank(serviceType) ? "" : "<service-type>${MsoUtils.xmlEscape(serviceType)}</service-type>"
String serviceRoleLine = isBlank(serviceRole) ? "" : "<service-role>${MsoUtils.xmlEscape(serviceRole)}</service-role>"
-
+
//QUERY CATALOG DB AND GET WORKLOAD / ENVIRONMENT CONTEXT
String environmentContext = ""
String workloadContext =""
-
+
try{
String json = cutils.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
-
+
msoLogger.debug("JSON IS: "+json)
-
+
environmentContext = jsonUtil.getJsonValue(json, "serviceResources.environmentContext") ?: ""
workloadContext = jsonUtil.getJsonValue(json, "serviceResources.workloadContext") ?: ""
msoLogger.debug("Env Context is: "+ environmentContext)
@@ -299,7 +299,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
-
+
//Create AAI Payload
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -318,7 +318,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("serviceInstanceData", serviceInstanceData)
msoLogger.debug(" 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData)
-
+
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -329,7 +329,6 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit preProcessRequest")
}
- //TODO: Will be able to replace with call to GenericGetService
public void getAAICustomerById (DelegateExecution execution) {
// https://{aaiEP}/aai/v8/business/customers/customer/{globalCustomerId}
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -400,47 +399,6 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- msoLogger.trace("postProcessAAIGET")
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.debug("Error getting Service-instance from AAI", + serviceInstanceName)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- msoLogger.debug("Found Service-instance in AAI")
- msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- msoLogger.trace("Exit postProcessAAIGET")
- }
-
public void postProcessAAIPUT(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessAAIPUT")
@@ -498,17 +456,17 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
def modelVersion = execution.getVariable("modelVersion")
def modelUuid = execution.getVariable("modelUuid")
def modelName = execution.getVariable("modelName")
-
+
def sdncRequestId = UUID.randomUUID().toString()
-
+
def siParamsXml = execution.getVariable("siParamsXml")
-
+
// special URL for SDNW, msoAction helps set diff url in SDNCA
if("TRANSPORT".equalsIgnoreCase(execution.getVariable("serviceType")))
{
msoAction = "TRANSPORT"
}
-
+
String sdncAssignRequest =
"""<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
@@ -563,7 +521,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate)
rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete)
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("rollbackData:\n" + rollbackData.toString())
} catch (BpmnError e) {
@@ -575,7 +533,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit preProcessSDNCAssignRequest")
}
-
+
public void postProcessSDNCAssign (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessSDNCAssign")
@@ -612,7 +570,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessSDNCAssign")
}
-
+
public void postProcessAAIGET2(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessAAIGET2")
@@ -660,7 +618,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("preProcessRollback")
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -697,19 +655,19 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessRollback")
}
-
+
public void createProject(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("createProject")
- String bpmnRequest = execution.getVariable("requestJson")
- String projectName = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.project.projectName")
+ String bpmnRequest = execution.getVariable("requestJson")
+ String projectName = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.project.projectName")
String serviceInstance = execution.getVariable("serviceInstanceId")
-
+
msoLogger.debug("BPMN REQUEST IS: "+ bpmnRequest)
msoLogger.debug("PROJECT NAME: " + projectName)
msoLogger.debug("Service Instance: " + serviceInstance)
-
+
if(projectName == null||projectName.equals("")){
msoLogger.debug("Project Name was not found in input. Skipping task...")
}else{
@@ -722,27 +680,27 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.error(ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- }
+ }
msoLogger.trace("Exit createProject")
}
-
+
public void createOwningEntity(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("createOwningEntity")
String msg = "";
- String bpmnRequest = execution.getVariable("requestJson")
- String owningEntityId = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.owningEntity.owningEntityId")
+ String bpmnRequest = execution.getVariable("requestJson")
+ String owningEntityId = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.owningEntity.owningEntityId")
String owningEntityName = jsonUtil.getJsonValue(bpmnRequest,"requestDetails.owningEntity.owningEntityName");
String serviceInstance = execution.getVariable("serviceInstanceId")
-
+
msoLogger.debug("owningEntity: " + owningEntityId)
msoLogger.debug("OwningEntityName: "+ owningEntityName)
msoLogger.debug("Service Instance: " + serviceInstance)
-
+
try{
AAICreateResources aaiCR = new AAICreateResources()
if(owningEntityId==null||owningEntityId.equals("")){
- msg = "Exception in createOwningEntity. OwningEntityId is null in input.";
+ msg = "Exception in createOwningEntity. OwningEntityId is null in input.";
throw new IllegalStateException();
}else{
if(aaiCR.existsOwningEntity(owningEntityId)){
@@ -769,21 +727,21 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit createOwningEntity")
}
-
+
// *******************************
// Build Error Section
// *******************************
public void processJavaException(DelegateExecution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
+
try{
msoLogger.debug("Caught a Java Exception in DoCreateServiceInstance")
msoLogger.debug("Started processJavaException Method")
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception in DoCreateServiceInstance") // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception in DoCreateServiceInstance")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException") // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
index dd56b8f2cc..dd56b8f2cc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
index 10f6acd403..10f6acd403 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 59d38bfe86..59d38bfe86 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index a0b7dabb32..a0b7dabb32 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
index 5995b6b099..5995b6b099 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
index f734ffb3ff..f87f32c610 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -35,6 +35,14 @@ import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
class DoCreateVfModuleVolumeV2 extends VfModuleBase {
@@ -53,16 +61,16 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
public void preProcessRequest(DelegateExecution execution, isDebugLogEnabled) {
-
+
execution.setVariable("prefix",prefix)
execution.setVariable(prefix+'SuccessIndicator', false)
execution.setVariable(prefix+'isPONR', false)
displayInput(execution, isDebugLogEnabled)
setRollbackData(execution, isDebugLogEnabled)
- setRollbackEnabled(execution, isDebugLogEnabled)
-
-
+ setRollbackEnabled(execution, isDebugLogEnabled)
+
+
def tenantId = execution.getVariable("tenantId")
if (tenantId == null) {
String cloudConfiguration = execution.getVariable("cloudConfiguration")
@@ -84,17 +92,17 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
execution.setVariable("modelCustomizationId", modelCustomizationUuid)
msoLogger.debug("modelCustomizationId: " + modelCustomizationUuid)
-
+
//modelName
def modelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
execution.setVariable("modelName", modelName)
msoLogger.debug("modelName: " + modelName)
-
+
// The following is used on the get Generic Service Instance call
execution.setVariable('GENGS_type', 'service-instance')
}
-
+
/**
* Display input variables
* @param execution
@@ -111,10 +119,10 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
msoLogger.debug('End input.')
}
-
-
+
+
/**
- * Define and set rollbackdata object
+ * Define and set rollbackdata object
* @param execution
* @param isDebugEnabled
*/
@@ -127,25 +135,29 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
rollbackData.put("DCVFMODULEVOL", "volumeGroupName", volumeGroupName)
execution.setVariable("rollbackData", rollbackData)
}
-
-
+
+
/**
- * validate getServiceInstance response
- * @param execution
- * @param isDebugEnabled
+ * Gets the service instance uri from aai
*/
- public void validateGetServiceInstanceCall(DelegateExecution execution, isDebugEnabled) {
- def found = execution.getVariable('GENGS_FoundIndicator')
- def success = execution.getVariable('GENGS_SuccessIndicator')
- def serviceInstanceId = execution.getVariable('serviceInstanceId')
- msoLogger.debug("getServiceInstance success: " + success)
- msoLogger.debug("getServiceInstance found: " + found)
- if(!found || !success) {
- String errorMessage = "Service instance id not found in AAI: ${serviceInstanceId}."
- msoLogger.debug(errorMessage)
- (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, msg)
}
-
}
/**
@@ -175,7 +187,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
msoLogger.debug(errorMessage)
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
-
+
def poCloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
if ((poCloudRegion != "ERROR")) {
execution.setVariable("poLcpCloudRegionId", poCloudRegion)
@@ -185,7 +197,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
msoLogger.debug(errorMessage)
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
-
+
def rollbackData = execution.getVariable("rollbackData")
rollbackData.put("DCVFMODULEVOL", "aiccloudregion", cloudRegion)
}
@@ -242,7 +254,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
/**
- * Create a WorkflowException
+ * Create a WorkflowException
* @param execution
* @param isDebugEnabled
*/
@@ -265,7 +277,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
throw new BpmnError("MSOWorkflowException")
}
-
+
/**
* Create volume group in AAI
* @param execution
@@ -280,7 +292,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def vnfType = execution.getVariable("vnfType")
def tenantId = execution.getVariable("tenantId")
def cloudRegion = execution.getVariable('lcpCloudRegionId')
-
+
msoLogger.debug("volumeGroupId: " + volumeGroupId)
def testGroupId = execution.getVariable('test-volume-group-id')
@@ -316,7 +328,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
execution.setVariable(prefix+"createAAIVolumeGrpNameReturnCode", returnCode)
execution.setVariable(prefix+"createAAIVolumeGrpNameResponse", aaiResponseAsString)
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
if (returnCode =='201') {
@@ -333,7 +345,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
}
}
-
+
/**
* Prepare VNF adapter create request XML
@@ -345,7 +357,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def vnfId = utils.getNodeText(aaiGenericVnfResponse, 'vnf-id')
def vnfName = utils.getNodeText(aaiGenericVnfResponse, 'vnf-name')
def vnfType = utils.getNodeText(aaiGenericVnfResponse, "vnf-type")
-
+
def requestId = execution.getVariable('msoRequestId')
def serviceId = execution.getVariable('serviceInstanceId')
def cloudSiteId = execution.getVariable('poLcpCloudRegionId')
@@ -353,11 +365,11 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def volumeGroupId = execution.getVariable('volumeGroupId')
def volumeGroupnName = execution.getVariable('volumeGroupName')
- def vnfVersion = execution.getVariable("asdcServiceModelVersion")
+ def vnfVersion = execution.getVariable("asdcServiceModelVersion")
def vnfModuleType = execution.getVariable("modelName")
def modelCustomizationId = execution.getVariable("modelCustomizationId")
-
+
// for testing
msoLogger.debug("volumeGroupId: " + volumeGroupId)
def testGroupId = execution.getVariable('test-volume-group-id')
@@ -367,9 +379,9 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
execution.setVariable("test-volume-group-name", "MSOTESTVOL101a-vSAMP12_base_vol_module-0")
}
msoLogger.debug("volumeGroupId to be used: " + volumeGroupId)
-
+
// volume group parameters
-
+
String volumeGroupParams = ''
StringBuilder sbParams = new StringBuilder()
Map<String, String> paramsMap = execution.getVariable("vfModuleInputParams")
@@ -396,17 +408,17 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
if(failIfExists == null) {
failIfExists = 'true'
}
-
+
String messageId = UUID.randomUUID()
msoLogger.debug("messageId to be used is generated: " + messageId)
-
+
def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
if ('true'.equals(useQualifiedHostName)) {
notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
}
msoLogger.debug("CreateVfModuleVolume - notificationUrl: "+ notificationUrl)
-
+
// build request
String vnfSubCreateWorkflowRequest =
"""
@@ -465,9 +477,9 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String vnfSubRollbackWorkflowRequestAsString = utils.formatXml(vnfSubRollbackWorkflowRequest)
execution.setVariable(prefix+"rollbackVnfARequest", vnfSubRollbackWorkflowRequestAsString)
}
-
+
public String buildRollbackVolumeGroupRequestXml(volumeGroupId, cloudSiteId, tenantId, requestId, serviceId, messageId, notificationUrl) {
-
+
def request = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
@@ -485,16 +497,16 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
<skipAAI>true</skipAAI>
<notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
</rollbackVolumeGroupRequest>
- """
-
- return request
+ """
+
+ return request
}
public String updateRollbackVolumeGroupRequestXml(String rollabackRequest, String heatStackId) {
String newRequest = rollabackRequest.replace("{{VOLUMEGROUPSTACKID}}", heatStackId)
return newRequest
}
-
+
/**
* Validate VNF adapter response
* @param execution
@@ -513,10 +525,10 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
rollbackData.put("DCVFMODULEVOL", "isCreateVnfRollbackNeeded", "true")
}
}
-
+
/**
- * Update voulume group in AAI
+ * Update voulume group in AAI
* @TODO: Can we re-use the create method??
* @param execution
* @param isDebugEnabled
@@ -525,7 +537,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
- String modelCustomizationId = execution.getVariable("modelCustomizationId")
+ String modelCustomizationId = execution.getVariable("modelCustomizationId")
String cloudRegion = execution.getVariable("lcpCloudRegionId")
AaiUtil aaiUtil = new AaiUtil(this)
@@ -538,7 +550,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
def heatStackID = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
-
+
execution.setVariable(prefix+"heatStackId", heatStackID)
NetworkUtils networkUtils = new NetworkUtils()
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 46a502e124..7fa8b4409b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -43,6 +43,7 @@ import org.onap.so.client.aai.entities.AAIResultWrapper
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.springframework.web.util.UriUtils
+import org.json.JSONObject
/**
@@ -247,6 +248,32 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
msoLogger.trace("COMPLETED DoCreateVnf PreProcessRequest Process")
}
+ /**
+ * Gets the service instance from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('DoCVNF_serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("GENGS_siResourceLink", uri.build().toString())
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch(Exception ex) {
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
private Object getVariableEnforced(DelegateExecution execution, String name){
Object enforced = execution.getVariable(name)
if(!enforced){
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
index d3dbd9107e..d3dbd9107e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
index eafc39b1dd..eafc39b1dd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index 238ac82c01..238ac82c01 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index 20a7f43de7..21bf0f2c5c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -37,7 +37,14 @@ import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse;
import org.springframework.web.util.UriUtils;
-
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
import groovy.json.*
@@ -149,63 +156,32 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
msoLogger.info("Exited " + method)
}
-
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessAAIGET(' +'execution=' + execution.getId() +')'
- msoLogger.info("Entered " + method)
-
- String msg = ""
-
+ /**
+ * Gets the service instance and its relationships from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- msoLogger.info("serviceInstanceId: "+serviceInstanceId)
-
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- msoLogger.info("foundInAAI: "+foundInAAI)
-
- String serviceType = ""
-
-
- if(foundInAAI){
- msoLogger.info("Found Service-instance in AAI")
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
- String siData = execution.getVariable("GENGS_service")
- msoLogger.info("SI Data")
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+ String json = wrapper.getJson()
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.info("Error getting Service-instance from AAI", + serviceInstanceId)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
+ execution.setVariable("serviceInstance", json)
- msoLogger.info("Service-instance NOT found in AAI. Silent Success")
- }
- }catch (BpmnError e) {
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Bpmn error encountered in " + method + "--" + ex.getMessage()
- msoLogger.info(msg)
+ }catch(NotFoundException e) {
+ msoLogger.info("SI not found in aai. Silent Success ")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.info("Exited " + method)
}
private void loadResourcesProperties(DelegateExecution execution) {
@@ -334,23 +310,14 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
String serviceInstanceId = execution.getVariable("serviceInstanceId")
- // confirm if ServiceInstance was found
- if ( !execution.getVariable("GENGS_FoundIndicator") )
- {
- String exceptionMessage = "Bpmn error encountered in DeleteMobileAPNCustService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
execution.setVariable(Prefix+"resourceList", "")
execution.setVariable(Prefix+"resourceCount", 0)
execution.setVariable(Prefix+"nextResource", 0)
execution.setVariable(Prefix+"resourceFinish", true)
- // get SI extracted by GenericGetService
- String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
- msoLogger.info("serviceInstanceAaiRecord: " +serviceInstanceAaiRecord)
-
- String aaiJsonRecord = jsonUtil.xml2json(serviceInstanceAaiRecord)
+ String aaiJsonRecord = execution.getVariable("serviceInstance");
+ msoLogger.info("serviceInstanceAaiRecord: " +aaiJsonRecord)
msoLogger.info("aaiJsonRecord: " +aaiJsonRecord)
def serviceInstanceName = jsonUtil.getJsonValue(aaiJsonRecord, "service-instance.service-instance-name")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 54dfae3760..76dba27890 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -192,76 +192,93 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
//Confirm there are no related service instances (vnf/network or volume)
if (utils.nodeExists(siData, "relationship-list")) {
utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
- //test(siData)
- NodeList nodeList = serviceXml.getElementsByTagName("relationship")
JSONArray jArray = new JSONArray()
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- def e = eElement.getElementsByTagName("related-to").item(0).getTextContent() //for ns
- if(e.equals("service-instance")){
- def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
- utils.log("INFO", "ServiceInstance Related NS :" + relatedObject, isDebugEnabled)
- NodeList dataList = node.getChildNodes()
- if(null != dataList) {
- JSONObject jObj = new JSONObject()
- for (int i = 0; i < dataList.getLength(); i++) {
- Node dNode = dataList.item(i)
- if(dNode.getNodeName() == "relationship-data") {
- Element rDataEle = (Element)dNode
- def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
- def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
- if(eKey.equals("service-instance.service-instance-id")){
- jObj.put("resourceInstanceId", eValue)
- }
-
- }
- else if(dNode.getNodeName() == "related-to-property"){
- Element rDataEle = (Element)dNode
- def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
- def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
- if(eKey.equals("service-instance.service-instance-name")){
- jObj.put("resourceType", eValue)
- }
- }
- }
- utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
- jArray.put(jObj)
- }
- //for overlay/underlay
- }else if (e.equals("configuration")){
- def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
- utils.log("INFO", "ServiceInstance Related Configuration :" + relatedObject, isDebugEnabled)
- NodeList dataList = node.getChildNodes()
- if(null != dataList) {
- JSONObject jObj = new JSONObject()
- for (int i = 0; i < dataList.getLength(); i++) {
- Node dNode = dataList.item(i)
- if(dNode.getNodeName() == "relationship-data") {
- Element rDataEle = (Element)dNode
- def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
- def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
- if(eKey.equals("configuration.configuration-id")){
- jObj.put("resourceInstanceId", eValue)
- }
- }
- else if(dNode.getNodeName() == "related-to-property"){
- Element rDataEle = (Element)dNode
- def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
- def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
- if(eKey.equals("configuration.configuration-type")){
- jObj.put("resourceType", eValue)
- }
- }
- }
- utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
- jArray.put(jObj)
- }
- }
- }
+
+ XmlParser xmlParser = new XmlParser()
+ Node root = xmlParser.parseText(siData)
+ def relation_list = utils.getChildNode(root, 'relationship-list')
+ def relationships = utils.getIdenticalChildren(relation_list, 'relationship')
+
+ for (def relation: relationships) {
+ def jObj = getRelationShipData(relation, isDebugEnabled)
+ jArray.put(jObj)
}
+
execution.setVariable("serviceRelationShip", jArray.toString())
+
+// //test(siData)
+// NodeList nodeList = serviceXml.getElementsByTagName("relationship")
+// JSONArray jArray = new JSONArray()
+// for (int x = 0; x < nodeList.getLength(); x++) {
+// Node node = nodeList.item(x)
+// if (node.getNodeType() == Node.ELEMENT_NODE) {
+// Element eElement = (Element) node
+// def e = eElement.getElementsByTagName("related-to").item(0).getTextContent() //for ns
+// if(e.equals("service-instance")){
+// def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
+// utils.log("INFO", "ServiceInstance Related NS :" + relatedObject, isDebugEnabled)
+// NodeList dataList = node.getChildNodes()
+// if(null != dataList) {
+// JSONObject jObj = new JSONObject()
+// for (int i = 0; i < dataList.getLength(); i++) {
+// Node dNode = dataList.item(i)
+// if(dNode.getNodeName() == "relationship-data") {
+// Element rDataEle = (Element)dNode
+// def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
+// def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
+// if(eKey.equals("service-instance.service-instance-id")){
+// jObj.put("resourceInstanceId", eValue)
+// }
+//
+// }
+// else if(dNode.getNodeName() == "related-to-property"){
+// Element rDataEle = (Element)dNode
+// def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
+// def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
+// if(eKey.equals("service-instance.service-instance-name")){
+// jObj.put("resourceType", eValue)
+// }
+// }
+// }
+// utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
+// jArray.put(jObj)
+// }
+// //for overlay/underlay
+// }else if (e.equals("configuration")){
+// def relatedObject = eElement.getElementsByTagName("related-link").item(0).getTextContent()
+// utils.log("INFO", "ServiceInstance Related Configuration :" + relatedObject, isDebugEnabled)
+// NodeList dataList = node.getChildNodes()
+// if(null != dataList) {
+// JSONObject jObj = new JSONObject()
+// for (int i = 0; i < dataList.getLength(); i++) {
+// Node dNode = dataList.item(i)
+// if(dNode.getNodeName() == "relationship-data") {
+// Element rDataEle = (Element)dNode
+// def eKey = rDataEle.getElementsByTagName("relationship-key").item(0).getTextContent()
+// def eValue = rDataEle.getElementsByTagName("relationship-value").item(0).getTextContent()
+// if(eKey.equals("configuration.configuration-id")){
+// jObj.put("resourceInstanceId", eValue)
+// }
+// }
+// else if(dNode.getNodeName() == "related-to-property"){
+// Element rDataEle = (Element)dNode
+// def eKey = rDataEle.getElementsByTagName("property-key").item(0).getTextContent()
+// def eValue = rDataEle.getElementsByTagName("property-value").item(0).getTextContent()
+// if(eKey.equals("configuration.configuration-type")){
+// jObj.put("resourceType", eValue)
+// }
+// }
+// }
+// utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
+// jArray.put(jObj)
+// }
+// // for SP-Partner
+// }else if (e.equals("sp-partner")){
+//
+// }
+// }
+// }
+// execution.setVariable("serviceRelationShip", jArray.toString())
}
}
}else{
@@ -292,6 +309,55 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
}
utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
}
+
+ private JSONObject getRelationShipData(node, isDebugEnabled){
+ JSONObject jObj = new JSONObject()
+
+ def relation = utils.nodeToString(node)
+ def rt = utils.getNodeText1(relation, "related-to")
+
+ def rl = utils.getNodeText1(relation, "related-link")
+ utils.log("INFO", "ServiceInstance Related NS/Configuration :" + rl, isDebugEnabled)
+
+ def rl_datas = utils.getIdenticalChildren(node, "relationship-data")
+ for(def rl_data : rl_datas) {
+ def eKey = utils.getChildNodeText(rl_data, "relationship-key")
+ def eValue = utils.getChildNodeText(rl_data, "relationship-value")
+
+ if ((rt == "service-instance" && eKey.equals("service-instance.service-instance-id"))
+ //for overlay/underlay
+ || (rt == "configuration" && eKey.equals("configuration.configuration-id")
+ )){
+ jObj.put("resourceInstanceId", eValue)
+ }
+ // for sp-partner and others
+ else if(eKey.equals(rt + ".id")){
+ jObj.put("resourceInstanceId", eValue)
+ String resourceName = rt + eValue;
+ jObj.put("resourceType", resourceName)
+ }
+ else if(eKey.equals(rt + ".id")){
+ jObj.put("resourceInstanceId", eValue)
+ String resourceName = rt + eValue;
+ jObj.put("resourceType", resourceName)
+ }
+ }
+
+ def rl_props = utils.getIdenticalChildren(node, "related-to-property")
+ for(def rl_prop : rl_props) {
+ def eKey = utils.getChildNodeText(rl_prop, "property-key")
+ def eValue = utils.getChildNodeText(rl_prop, "property-value")
+ if((rt == "service-instance" && eKey.equals("service-instance.service-instance-name"))
+ //for overlay/underlay
+ || (rt == "configuration" && eKey.equals("configuration.configuration-type"))){
+ jObj.put("resourceType", eValue)
+ }
+ }
+
+ utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
+
+ return jObj
+ }
public void getCurrentNS(DelegateExecution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
@@ -351,6 +417,8 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
if (serviceRelationShip != null) {
relationShipList = jsonSlurper.parseText(serviceRelationShip)
}
+
+ List<Resource> deleteRealResourceList = new ArrayList<Resource>();
//Set the real resource instance id to the decomosed resource list
for (Resource resource: deleteResourceList) {
@@ -360,13 +428,17 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
if (relationShipList != null) {
relationShipList.each {
if (StringUtils.containsIgnoreCase(it.resourceType, resource.getModelInfo().getModelName())) {
- resource.setResourceId(it.resourceInstanceId);
+ resource.setResourceId(it.resourceInstanceId)
+ deleteRealResourceList.add(resource)
}
}
}
}
- execution.setVariable("deleteResourceList", deleteResourceList)
- utils.log("DEBUG", "delete resource list : " + deleteResourceList, isDebugEnabled)
+
+ // only delete real existing resources
+ execution.setVariable("deleteResourceList", deleteRealResourceList)
+
+ utils.log("DEBUG", "delete resource list : " + deleteRealResourceList, isDebugEnabled)
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
utils.log("DEBUG", exceptionMessage, isDebugEnabled)
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index 3ee059cb02..3ee059cb02 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
index ca6e21eedc..ca6e21eedc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index a5a96f3bd3..a5a96f3bd3 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index 198144ad34..c7e3eb437c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -22,12 +22,10 @@ package org.onap.so.bpmn.infrastructure.scripts
import static org.apache.commons.lang3.StringUtils.*;
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -35,17 +33,13 @@ import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.logger.MsoLogger
-import org.onap.so.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
-import org.w3c.dom.Document
-import org.w3c.dom.Element
-import org.w3c.dom.Node
-import org.w3c.dom.NodeList
-import org.xml.sax.InputSource
import groovy.json.*
@@ -282,170 +276,86 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit postProcessSDNC " + method + " ")
}
- public void postProcessAAIGET(DelegateExecution execution) {
-
- msoLogger.trace("postProcessAAIGET ")
- String msg = ""
-
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
try {
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI == true){
- msoLogger.debug("Found Service-instance in AAI")
-
- //Extract GlobalSubscriberId
- String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
- if (isBlank(siRelatedLink))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("GENGS_siResourceLink", uri.build().toString())
+ Map<String, String> keys = uri.getURIKeys()
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if(isBlank(globalSubscriberId)){
+ globalSubscriberId = keys.get("global-customer-id")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
}
- else
- {
- msoLogger.debug("Found Service-instance in AAI. link: " + siRelatedLink)
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- if(isBlank(globalSubscriberId)){
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- globalSubscriberId = siRelatedLink.substring(custStart + 9, custEnd)
- execution.setVariable("globalSubscriberId", globalSubscriberId)
- }
-
- //Extract Service Type if not provided on request
- String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
- if(isBlank(subscriptionServiceType)){
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
- subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- }
- if (isBlank(globalSubscriberId) || isBlank(subscriptionServiceType))
- {
- msg = "Could not retrive global-customer-id & subscription-service-type from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ //Extract Service Type if not provided on request
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ if(isBlank(subscriptionServiceType)){
+ String serviceTypeEncoded = keys.get("service-type") //TODO will this produce as already decoded?
+ subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
}
- String siData = execution.getVariable("GENGS_service")
- msoLogger.debug("SI Data")
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- else
- {
- msoLogger.debug("SI Data" + siData)
- serviceType = utils.getNodeText(siData,"service-type")
+ AAIResultWrapper wrapper = resourceClient.get(uri)
+ List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF))
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
+
+ if(uriList.isEmpty){
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ String orchestrationStatus = si.getOrchestrationStatus()
+ String serviceType = si.getServiceType()
execution.setVariable("serviceType", serviceType)
- execution.setVariable("serviceRole", utils.getNodeText(siData,"service-role"))
- String orchestrationStatus = utils.getNodeText(siData,"orchestration-status")
-
- //Confirm there are no related service instances (vnf/network or volume)
- if (utils.nodeExists(siData, "relationship-list")) {
- msoLogger.debug("SI Data relationship-list exists:")
- InputSource source = new InputSource(new StringReader(siData));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document serviceXml = docBuilder.parse(source)
-
- NodeList nodeList = serviceXml.getElementsByTagName("relationship")
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
- if(e.equals("generic-vnf") || e.equals("l3-network") || e.equals("allotted-resource") ){
- msoLogger.debug("ServiceInstance still has relationship(s) to generic-vnfs, l3-networks or allotted-resources")
- execution.setVariable("siInUse", true)
- //there are relationship dependencies to this Service Instance
- msg = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }else{
- msoLogger.debug("Relationship NOT related to OpenStack")
- }
- }
- }
- }
+ execution.setVariable("serviceRole", si.getServiceRole())
- if ("TRANSPORT".equalsIgnoreCase(serviceType))
- {
- if ("PendingDelete".equals(orchestrationStatus))
- {
+ if("TRANSPORT".equalsIgnoreCase(serviceType)){
+ if("PendingDelete".equals(orchestrationStatus)){
execution.setVariable("skipDeactivate", true)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus)
}
- else
- {
- msg = "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status:" + orchestrationStatus
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
}
- //alacarte SIs are NOT sent to sdnc. exceptions are listed in config variable
String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
- msoLogger.debug("SDNC SI serviceTypes:" + svcTypes)
List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*"));
boolean isSdncService= false
- for (String listEntry : svcList){
- if (listEntry.equalsIgnoreCase(serviceType)){
+ for(String listEntry : svcList){
+ if(listEntry.equalsIgnoreCase(serviceType)){
isSdncService = true
break;
}
}
-
- //All Macros are sent to SDNC, TRANSPORT(Macro) is sent to SDNW
- //Alacartes are sent to SDNC if they are listed in config variable above
execution.setVariable("sendToSDNC", true)
- if(execution.getVariable("sdncVersion").equals("1610")) //alacarte
- {
+ if(execution.getVariable("sdncVersion").equals("1610")){
if(!isSdncService){
execution.setVariable("sendToSDNC", false)
}
}
- msoLogger.debug("isSdncService: " + isSdncService)
- msoLogger.debug("Send To SDNC: " + execution.getVariable("sendToSDNC"))
- msoLogger.debug("Service Type: " + execution.getVariable("serviceType"))
-
+ }else{
+ execution.setVariable("siInUse", true)
+ msoLogger.debug("Stopped deleting Service Instance, it has dependencies")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies")
}
}else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
- msoLogger.debug("Error getting Service-instance from AAI", + serviceInstanceId)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- msoLogger.debug("Service-instance NOT found in AAI. Silent Success")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance not found in aai")
}
- } catch (BpmnError e) {
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.trace("Exit postProcessAAIGET ")
}
/**
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
index 0069bf4f0a..0069bf4f0a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index b41b74e509..b41b74e509 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
index 1024fc57da..1024fc57da 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
index b1cef477be..b1cef477be 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
index 699e9bf40a..699e9bf40a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnf.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
index d448dd3e79..d448dd3e79 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
index 41d9384f52..41d9384f52 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
index e06e5238c6..e06e5238c6 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
index 5fb6a9df9a..cb50fbbee6 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * 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.
@@ -53,7 +53,7 @@ import groovy.json.*
* @param - serviceDecomposition_Original
* @param - addResourceList
* @param - delResourceList
- *
+ *
* Outputs:
* @param - rollbackData (localRB->null)
* @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
@@ -63,15 +63,15 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
String Prefix="DUPDSI_"
private static final String DebugFlag = "isDebugEnabled"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
public void preProcessRequest (DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** Enter DoUpdateE2EServiceInstance preProcessRequest *****", isDebugEnabled)
-
- String msg = ""
+
+ String msg = ""
try {
execution.setVariable("prefix", Prefix)
@@ -79,11 +79,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
//for AAI GET & PUT & SDNC assignToplology
String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
-
+
//for AAI PUT & SDNC assignTopology
String serviceType = execution.getVariable("serviceType")
utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
-
+
//for SDNC assignTopology
String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
@@ -92,14 +92,14 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(serviceType)) {
msg = "Input serviceType is null"
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
- //Generated in parent for AAI
+
+ //Generated in parent for AAI
String serviceInstanceId = execution.getVariable("serviceInstanceId")
if (isBlank(serviceInstanceId)){
msg = "Input serviceInstanceId is null"
@@ -108,21 +108,21 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
String serviceInstanceName = execution.getVariable("serviceInstanceName")
-
+
// user params
String uuiRequest = execution.getVariable("uuiRequest")
-
+
// target model Invariant uuid
String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
- execution.setVariable("modelInvariantUuid", modelInvariantUuid)
- utils.log("INFO", "modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
-
+ execution.setVariable("modelInvariantUuid", modelInvariantUuid)
+ utils.log("INFO", "modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
+
// target model uuid
String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
execution.setVariable("modelUuid", modelUuid)
-
+
utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
-
+
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -130,10 +130,10 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("INFO", "======== COMPLETED preProcessRequest Process ======== ", isDebugEnabled)
+ utils.log("INFO", "======== COMPLETED preProcessRequest Process ======== ", isDebugEnabled)
}
-
+
public void preInitResourcesOperStatus(DelegateExecution execution){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -161,7 +161,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
for(Resource resource : resourceList){
resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
}
-
+
def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
@@ -189,34 +189,34 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
}
- utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
}
-
+
public void preProcessForAddResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessForAddResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "create")
-
+
execution.setVariable("hasResourcetoAdd", false)
List<Resource> addResourceList = execution.getVariable("addResourceList")
if(addResourceList != null && !addResourceList.isEmpty()) {
- execution.setVariable("hasResourcetoAdd", true)
+ execution.setVariable("hasResourcetoAdd", true)
}
-
+
utils.log("INFO"," *** Exit preProcessForAddResource *** ", isDebugEnabled)
}
public void postProcessForAddResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessForAddResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "update")
utils.log("INFO"," *** Exit postProcessForAddResource *** ", isDebugEnabled)
}
-
+
public void preProcessForDeleteResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessForDeleteResource ***** ", isDebugEnabled)
@@ -232,7 +232,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
if(hasResourcetoDelete) {
def jsonSlurper = new JsonSlurper()
- String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
List relationShipList = jsonSlurper.parseText(serviceRelationShip)
//Set the real resource instance id to the decomosed resource list
@@ -249,7 +249,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
}
}
-
+
execution.setVariable("deleteResourceList", delResourceList)
utils.log("INFO"," *** Exit preProcessForDeleteResource *** ", isDebugEnabled)
@@ -258,60 +258,13 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
public void postProcessForDeleteResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessForDeleteResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "update")
utils.log("INFO"," *** Exit postProcessForDeleteResource *** ", isDebugEnabled)
- }
-
- public void preProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- }
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET", + serviceInstanceName, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- String aaiService = execution.getVariable("GENGS_service")
- if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "resource-version"))) {
- execution.setVariable("serviceInstanceVersion", utils.getNodeText(aaiService, "resource-version"))
- utils.log("INFO","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled)
- }
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoUpdateE2EServiceInstance.postProcessAAIGET " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
- }
+ }
- public void preProcessAAIPUT(DelegateExecution execution) {
+ public void preProcessAAIPUT(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO","Entered " + method, isDebugEnabled)
@@ -321,7 +274,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
String serviceInstanceVersion = execution.getVariable("serviceInstanceVersion")
//execution.setVariable("GENPS_serviceResourceVersion", serviceInstanceVersion)
-
+
//requestDetails.modelInfo.for AAI PUT servieInstanceData
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
@@ -334,7 +287,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
AaiUtil aaiUriUtil = new AaiUtil(this)
- utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
+ utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
utils.log("INFO","aai_uri: " + aai_uri, isDebugEnabled)
String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
@@ -349,7 +302,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
<service-role>${MsoUtils.xmlEscape(aaiServiceRole)}</service-role>
<resource-version>${MsoUtils.xmlEscape(serviceInstanceVersion)}</resource-version>
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
- <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
</service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
@@ -357,10 +310,10 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.logAudit(serviceInstanceData)
utils.log("INFO", " aai_uri " + aai_uri + " namespace:" + namespace, isDebugEnabled)
utils.log("INFO", " 'payload' to update Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
-
+
utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
+ }
+
public void postProcessAAIPUT(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessAAIPUT ***** ", isDebugEnabled)
@@ -397,13 +350,13 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
utils.log("INFO"," *** Exit postProcessAAIPUT *** ", isDebugEnabled)
- }
+ }
public void preProcessRollback (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessRollback ***** ", isDebugEnabled)
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -441,11 +394,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO"," *** Exit postProcessRollback *** ", isDebugEnabled)
}
-
+
public void postConfigRequest(execution){
//now do noting
}
-
+
}
-
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
index a2d94baaed..257142e8bd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -29,9 +29,9 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.logger.MsoLogger
-
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
import groovy.json.*
-
+import org.onap.so.bpmn.common.scripts.AaiUtil;
/**
* This groovy class supports the <class>DoUpdateE2EServiceInstanceRollback.bpmn</class> process.
@@ -67,13 +67,13 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
execution.setVariable("rollbackAAI",false)
execution.setVariable("rollbackAdded",false)
execution.setVariable("rollbackDeleted",false)
-
+
List addResourceList = execution.getVariable("addResourceList")
List delResourceList = execution.getVariable("delResourceList")
execution.setVariable("addResourceList_o", addResourceList)
execution.setVariable("delResourceList_o", delResourceList)
//exchange add and delete resource list
- execution.setVariable("addResourceList", delResourceList)
+ execution.setVariable("addResourceList", delResourceList)
execution.setVariable("delResourceList", addResourceList)
try {
@@ -103,14 +103,14 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
{
execution.setVariable("rollbackAdded", true)
}
-
+
def rollbackDeleted = rollbackData.get("SERVICEINSTANCE", "rollbackDeleted")
if ("true".equals(rollbackDeleted))
{
execution.setVariable("rollbackDeleted", true)
- }
+ }
- if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackAdded") != true
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackAdded") != true
&& execution.getVariable("rollbackDeleted") != true)
{
execution.setVariable("skipRollback", true)
@@ -148,7 +148,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
boolean rollbackAAI = execution.getVariable("rollbackAAI")
boolean rollbackAdded = execution.getVariable("rollbackAdded")
boolean rollbackDeleted = execution.getVariable("rollbackDeleted")
-
+
List addResourceList = execution.getVariable("addResourceList_o")
List delResourceList = execution.getVariable("delResourceList_o")
execution.setVariable("addResourceList", addResourceList)
@@ -177,66 +177,21 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
msoLogger.debug(msg)
}
}
-
-
+
+
public void preProcessForAddResource(DelegateExecution execution) {
}
public void postProcessForAddResource(DelegateExecution execution) {
}
-
+
public void preProcessForDeleteResource(DelegateExecution execution) {
}
public void postProcessForDeleteResource(DelegateExecution execution) {
- }
-
- public void preProcessAAIGET(DelegateExecution execution) {
- }
-
- public void postProcessAAIGET(DelegateExecution execution) {
- msoLogger.trace("postProcessAAIGET ")
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.info("Error getting Service-instance from AAI in postProcessAAIGET", + serviceInstanceName)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- String aaiService = execution.getVariable("GENGS_service")
- if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "resource-version"))) {
- execution.setVariable("serviceInstanceVersion_n", utils.getNodeText(aaiService, "resource-version"))
- msoLogger.info("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"))
- }
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET " + ex.getMessage()
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- msoLogger.trace("Exit postProcessAAIGET ")
- }
+ }
- public void preProcessAAIPUT(DelegateExecution execution) {
+ public void preProcessAAIPUT(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
msoLogger.info("Entered " + method)
String msg = ""
@@ -244,7 +199,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
String serviceInstanceVersion = execution.getVariable("serviceInstanceVersion_n")
// execution.setVariable("GENPS_serviceResourceVersion", serviceInstanceVersion)
-
+
//requestDetails.modelInfo.for AAI PUT servieInstanceData
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
@@ -255,7 +210,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
String modelUuid = execution.getVariable("model-version-id-original")
- //AAI PUT
+ //AAI PUT
AaiUtil aaiUriUtil = new AaiUtil(this)
utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -271,7 +226,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
<service-role>${MsoUtils.xmlEscape(aaiServiceRole)}</service-role>
<resource-version>${MsoUtils.xmlEscape(serviceInstanceVersion)}</resource-version>
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
- <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
</service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
@@ -279,10 +234,10 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
msoLogger.debug(serviceInstanceData)
msoLogger.info(" aai_uri " + aai_uri + " namespace:" + namespace)
msoLogger.info(" 'payload' to update Service Instance in AAI - " + "\n" + serviceInstanceData)
-
+
msoLogger.info("Exited " + method)
- }
-
+ }
+
public void postProcessAAIPUT(DelegateExecution execution) {
msoLogger.trace("postProcessAAIPUT ")
String msg = ""
@@ -299,7 +254,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
}
else
{
-
+
}
} catch (BpmnError e) {
@@ -310,7 +265,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
msoLogger.trace("Exit postProcessAAIPUT ")
- }
+ }
public void processRollbackException(DelegateExecution execution){
msoLogger.trace("processRollbackException ")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
index 7272f421fc..4f6fbf9966 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -37,6 +37,15 @@ import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
+
import groovy.json.*
import groovy.xml.XmlUtil
@@ -46,7 +55,7 @@ import groovy.xml.XmlUtil
*/
public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateNetworkInstance.class);
-
+
String Prefix="UPDNETI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -109,7 +118,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "networkTableRefUriList", null)
execution.setVariable(Prefix + "networkTableRefCount", 0)
execution.setVariable(Prefix + "tableRefCollection", "")
-
+
// AAI requery Id
execution.setVariable(Prefix + "requeryIdAAIRequest","")
execution.setVariable(Prefix + "requeryIdAAIResponse", "")
@@ -137,9 +146,9 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "isVnfBindingPresent", false)
execution.setVariable(Prefix + "Success", false)
execution.setVariable(Prefix + "serviceInstanceId", "")
-
+
execution.setVariable(Prefix + "isException", false)
-
+
}
// **************************************************
@@ -158,7 +167,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
try {
// initialize flow variables
InitializeProcessVariables(execution)
-
+
// GET Incoming request & validate 3 kinds of format.
execution.setVariable("action", "UPDATE")
String networkRequest = execution.getVariable("bpmnRequest")
@@ -169,7 +178,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
def prettyJson = JsonOutput.prettyPrint(networkRequest.toString())
msoLogger.debug(" Incoming message formatted . . . : " + '\n' + prettyJson)
networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
-
+
} catch (Exception ex) {
String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
@@ -177,27 +186,27 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
} else {
// XML format request is sent
-
+
}
} else {
// vIPR format request is sent, create xml from individual variables
networkRequest = vidUtils.createXmlNetworkRequestInstance(execution)
}
-
+
networkRequest = utils.formatXml(networkRequest)
msoLogger.debug(networkRequest)
execution.setVariable(Prefix + "networkRequest", networkRequest)
msoLogger.debug(" network-request - " + '\n' + networkRequest)
-
+
// validate 'disableRollback' (aka, 'suppressRollback')
boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
msoLogger.debug(Prefix + "rollbackEnabled - " + rollbackEnabled)
-
+
String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
execution.setVariable(Prefix + "networkInputs", networkInputs)
msoLogger.debug(Prefix + "networkInputs - " + '\n' + networkInputs)
-
+
// prepare messageId
String messageId = execution.getVariable(Prefix + "messageId") // for testing
if (messageId == null || messageId == "") {
@@ -207,11 +216,11 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" UPDNETI_messageId, pre-assigned: " + messageId)
}
execution.setVariable(Prefix + "messageId", messageId)
-
+
String source = utils.getNodeText(networkRequest, "source")
execution.setVariable(Prefix + "source", source)
msoLogger.debug(Prefix + "source - " + source)
-
+
String networkId = ""
if (utils.nodeExists(networkRequest, "network-id")) {
networkId = utils.getNodeText(networkRequest, "network-id")
@@ -221,10 +230,10 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String dataErrorMessage = "Variable 'network-id' value/element is missing."
msoLogger.debug(" Invalid Request - " + dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
+
}
}
-
+
String lcpCloudRegion = ""
if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
lcpCloudRegion = utils.getNodeText(networkRequest, "aic-cloud-region")
@@ -235,7 +244,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
}
-
+
String serviceInstanceId = ""
if (utils.nodeExists(networkRequest, "service-instance-id")) {
serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
@@ -246,35 +255,33 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
}
-
+
// PO Authorization Info / headers Authorization=
String basicAuthValuePO = UrnPropertiesReader.getVariable("mso.adapters.po.auth",execution)
-
+
try {
def encodedString = utils.getBasicAuth(basicAuthValuePO, UrnPropertiesReader.getVariable("mso.msoKey", execution))
execution.setVariable("BasicAuthHeaderValuePO",encodedString)
execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
+
} catch (IOException ex) {
String exceptionMessage = "Exception Encountered in DoUpdateNetworkInstance, PreProcessRequest() - "
String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
-
+
// Set variables for Generic Get Sub Flow use
execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId)
msoLogger.debug(Prefix + "serviceInstanceId - " + serviceInstanceId)
-
- execution.setVariable("GENGS_type", "service-instance")
- msoLogger.debug("GENGS_type - " + "service-instance")
+
msoLogger.debug(" Url for SDNC adapter: " + UrnPropertiesReader.getVariable("mso.adapters.sdnc.endpoint",execution))
-
+
String sdncVersion = execution.getVariable("sdncVersion")
msoLogger.debug("sdncVersion? : " + sdncVersion)
-
- // build 'networkOutputs'
+
+ // build 'networkOutputs'
networkId = utils.getNodeText(networkRequest, "network-id")
if ((networkId == null) || (networkId == "null")) {
networkId = ""
@@ -292,7 +299,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "networkOutputs - " + '\n' + networkOutputs)
execution.setVariable(Prefix + "networkId", networkId)
execution.setVariable(Prefix + "networkName", networkName)
-
+
} catch (BpmnError e) {
throw e;
@@ -307,6 +314,31 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
+ /**
+ * Gets the service instance uri from aai
+ *
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Service Instance not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
execution.setVariable("prefix", Prefix)
@@ -383,7 +415,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String returnCode = response.getStatusCode()
execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
msoLogger.debug(" ***** AAI Response Code : " + returnCode)
-
+
String aaiResponseAsString = response.getResponseBodyAsString()
if (returnCode=='200') {
@@ -462,12 +494,12 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String netName = utils.getNodeText(aaiResponseAsString, "network-name")
String networkOutputs =
"""<network-outputs>
- <network-id>${MsoUtils.xmlEscape(netId)}</network-id>
+ <network-id>${MsoUtils.xmlEscape(netId)}</network-id>
<network-name>${MsoUtils.xmlEscape(netName)}</network-name>
</network-outputs>"""
execution.setVariable(Prefix + "networkOutputs", networkOutputs)
msoLogger.debug(" networkOutputs - " + '\n' + networkOutputs)
-
+
} else {
if (returnCode=='404') {
String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
@@ -866,13 +898,13 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
+
} else {
if (aaiResponseAsString.contains("RESTFault")) {
WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
execution.setVariable("WorkflowException", exceptionObject)
throw new BpmnError("MSOWorkflowException")
-
+
} else {
// aai all errors
String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode
@@ -908,7 +940,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
} catch (BpmnError e) {
throw e;
-
+
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
@@ -917,7 +949,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
execution.setVariable("prefix", Prefix)
@@ -953,7 +985,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload)
String returnCode = response.getStatusCode()
String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
-
+
execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
msoLogger.debug(" ***** AAI Update Contrail Response Code : " + returnCode)
@@ -1015,7 +1047,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String queryIdResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo")
String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
-
+
// Prepare Network request
String routeCollection = execution.getVariable(Prefix + "routeCollection")
String policyCollection = execution.getVariable(Prefix + "networkCollection")
@@ -1057,7 +1089,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
if (networkId == null) {networkId = ""}
String serviceInstanceId = utils.getNodeText(updateNetworkInput, "service-instance-id")
-
+
String queryAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse")
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
@@ -1078,7 +1110,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
-
+
// **************************************************
@@ -1212,7 +1244,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "Success", true)
msoLogger.debug(" ***** postProcessResponse(), GOOD !!!")
} else {
- execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "Success", false)
execution.setVariable("rollbackData", null)
String exceptionMessage = " Exception encountered in MSO Bpmn. "
if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
@@ -1223,18 +1255,18 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
if (execution.getVariable(Prefix + "WorkflowException") != null) {
WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
exceptionMessage = pwfex.getErrorMessage()
- }
+ }
}
// going to the Main flow: a-la-carte or macro
msoLogger.debug(" ***** postProcessResponse(), BAD !!!")
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
}
-
+
} catch(BpmnError b){
msoLogger.debug("Rethrowing MSOWorkflowException")
throw b
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
@@ -1253,7 +1285,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Inside prepareSDNCRollbackRequest of DoUpdateNetworkInstance ")
try {
- // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
+ // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
// get variables
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
@@ -1282,11 +1314,11 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
public void prepareRollbackData(DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRollbackData() of DoUpdateNetworkInstance ")
-
+
try {
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1302,33 +1334,33 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
execution.setVariable("rollbackData", rollbackData)
msoLogger.debug("** rollbackData : " + rollbackData)
-
+
execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
msoLogger.debug("** WorkflowException : " + execution.getVariable("WorkflowException"))
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void prepareSuccessRollbackData(DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareSuccessRollbackData() of DoUpdateNetworkInstance ")
-
+
try {
-
+
if (execution.getVariable("sdncVersion") != '1610') {
// skip: 1702 for 'changeassign' or equivalent not yet defined in SNDC, so no rollback.
} else {
prepareSDNCRollbackRequest(execution)
}
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1343,43 +1375,43 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("** 'rollbackData' for Full Rollback : " + rollbackData)
execution.setVariable("WorkflowException", null)
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void setExceptionFlag(DelegateExecution execution){
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside setExceptionFlag() of DoUpdateNetworkInstance ")
-
+
try {
-
+
execution.setVariable(Prefix + "isException", true)
-
+
if (execution.getVariable("SavedWorkflowException1") != null) {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
} else {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
}
msoLogger.debug(Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"))
-
+
} catch(Exception ex){
String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
}
-
+
}
@@ -1396,7 +1428,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
index 8a13b3c392..8a13b3c392 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index 451e0293ef..451e0293ef 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
index 34a73bd35c..6b42406883 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -304,19 +304,22 @@ class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor {
VnfResource vnfResource = (VnfResource) execution.getVariable("vnfResourceDecomposition")
List<ModuleResource> moduleResources = vnfResource.getVfModules()
- for (j in 0..moduleResources.size()-1) {
- ModelInfo modelInfo = moduleResources[j].getModelInfo()
- String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
- msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
-
- if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
- String vfModuleModelInfo = modelInfo.toJsonString()
- String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo")
- execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue)
- msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue)
- break
+ if (moduleResources != null && !moduleResources.isEmpty()) {
+
+ for (j in 0..moduleResources.size()-1) {
+ ModelInfo modelInfo = moduleResources[j].getModelInfo()
+ String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
+ msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
+
+ if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
+ String vfModuleModelInfo = modelInfo.toJsonString()
+ String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo")
+ execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue)
+ msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue)
+ break
+ }
+
}
-
}
}catch(Exception e){
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
index 4deb53f0ce..4deb53f0ce 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HealchCheckActivate.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
index 8673ee7662..8673ee7662 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
index d729c770ca..d729c770ca 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
index 3a309cf5a2..3a309cf5a2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
index 538f882c2b..ac8e506e1f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * 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.
@@ -22,17 +22,25 @@ package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import javax.ws.rs.NotFoundException
+
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONArray
import org.json.JSONObject
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.springframework.web.util.UriUtils
import groovy.json.*
@@ -68,7 +76,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
msg = "Input serviceInstanceId' is null"
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
//subscriberInfo for aai
String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
if (isBlank(globalSubscriberId)) {
@@ -86,16 +94,16 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
if (isBlank(productFamilyId))
{
msg = "Input productFamilyId is null"
- utils.log("INFO", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
} else {
execution.setVariable("productFamilyId", productFamilyId)
}
-
+
//user params
- String userParams = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")
+ String userParams = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")
utils.log("INFO", "userParams:" + userParams, isDebugEnabled)
List<String> paramList = jsonUtil.StringArrayToList(execution, userParams)
- String uuiRequest = jsonUtil.getJsonValue(paramList.get(0), "UUIRequest")
+ String uuiRequest = jsonUtil.getJsonValue(paramList.get(0), "UUIRequest")
if (isBlank(uuiRequest)) {
msg = "Input uuiRequest is null"
utils.log("INFO", msg, isDebugEnabled)
@@ -116,34 +124,34 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
} else {
execution.setVariable("serviceType", serviceType)
}
-
+
// target model info
String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
execution.setVariable("modelInvariantUuid", modelInvariantUuid)
execution.setVariable("model-invariant-id-target", modelInvariantUuid)
-
+
String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
execution.setVariable("modelUuid", modelUuid)
execution.setVariable("model-version-id-target", modelUuid)
-
+
String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)
if(serviceModelName == null) {
serviceModelName = ""
}
- execution.setVariable("serviceModelName", serviceModelName)
-
+ execution.setVariable("serviceModelName", serviceModelName)
+
//operationId
String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
if (isBlank(operationId)) {
operationId = UUID.randomUUID().toString()
- }
- execution.setVariable("operationId", operationId)
+ }
+ execution.setVariable("operationId", operationId)
execution.setVariable("operationType", "update")
execution.setVariable("hasResourcetoUpdate", false)
-
+
execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
} catch (BpmnError e) {
@@ -155,164 +163,69 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
-
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
+ /**
+ * Gets the service instance and its relationships from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI){
- utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
-
- String siData = execution.getVariable("GENGS_service")
- utils.log("INFO", "SI Data", isDebugEnabled)
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
- utils.log("INFO", "SI Data" + siData, isDebugEnabled)
-
- // serviceInstanceName
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- if(isBlank(serviceInstanceName) && utils.nodeExists(siData, "service-instance-name")) {
- serviceInstanceName = utils.getNodeText(siData, "service-instance-name")
- execution.setVariable("serviceInstanceName", serviceInstanceName)
- }
-
- // Get Template uuid and version
- if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
- utils.log("INFO", "SI Data model-invariant-id and model-version-id exist:", isDebugEnabled)
-
- def modelInvariantId = utils.getNodeText(siData, "model-invariant-id")
- def modelVersionId = utils.getNodeText(siData, "model-version-id")
-
- // Set Original Template info
- execution.setVariable("model-invariant-id-original", modelInvariantId)
- execution.setVariable("model-version-id-original", modelVersionId)
- }
-
- //get related service instances (vnf/network or volume) for delete
- if (utils.nodeExists(siData, "relationship-list")) {
- utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
-
- JSONArray jArray = new JSONArray()
-
- XmlParser xmlParser = new XmlParser()
- Node root = xmlParser.parseText(siData)
- def relation_list = utils.getChildNode(root, 'relationship-list')
- def relationships = utils.getIdenticalChildren(relation_list, 'relationship')
-
- for (def relation: relationships) {
- def jObj = getRelationShipData(relation, isDebugEnabled)
- jArray.put(jObj)
- }
-
- execution.setVariable("serviceRelationShip", jArray.toString())
- }
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
- }
- }catch (BpmnError e) {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("serviceInstanceName", si.getServiceInstanceName())
+ execution.setVariable("model-invariant-id-original", si.getModelInvariantId())
+ execution.setVariable("model-version-id-original", si.getModelVersionId())
+
+ JSONObject ob = new JSONObject(wrapper.getJson())
+ JSONArray ar = ob.getJSONObject("relationship-list").getJSONArray("relationship")
+
+ execution.setVariable("serviceRelationShip", ar.toString())
+
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
+ }catch(NotFoundException e) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service-instance does not exist AAI")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
}
-
- private JSONObject getRelationShipData(node, isDebugEnabled){
- JSONObject jObj = new JSONObject()
-
- def relation = utils.nodeToString(node)
- def rt = utils.getNodeText(relation, "related-to")
-
- def rl = utils.getNodeText(relation, "related-link")
- utils.log("INFO", "ServiceInstance Related NS/Configuration :" + rl, isDebugEnabled)
-
- def rl_datas = utils.getIdenticalChildren(node, "relationship-data")
- for(def rl_data : rl_datas) {
- def eKey = utils.getChildNodeText(rl_data, "relationship-key")
- def eValue = utils.getChildNodeText(rl_data, "relationship-value")
-
- if ((rt == "service-instance" && eKey.equals("service-instance.service-instance-id"))
- //for overlay/underlay
- || (rt == "configuration" && eKey.equals("configuration.configuration-id"))){
- jObj.put("resourceInstanceId", eValue)
- }
- }
-
- def rl_props = utils.getIdenticalChildren(node, "related-to-property")
- for(def rl_prop : rl_props) {
- def eKey = utils.getChildNodeText(rl_prop, "property-key")
- def eValue = utils.getChildNodeText(rl_prop, "property-value")
- if((rt == "service-instance" && eKey.equals("service-instance.service-instance-name"))
- //for overlay/underlay
- || (rt == "configuration" && eKey.equals("configuration.configuration-type"))){
- jObj.put("resourceType", eValue)
- }
- }
-
- utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
- return jObj
- }
-
-
public void preCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
}
- public void postCompareModelVersions(DelegateExecution execution) {
+ public void postCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("DEBUG", " ======== STARTED postCompareModelVersions Process ======== ", isDebugEnabled)
-
+
def hasResourcetoUpdate = false
def hasResourcetoAdd = false
def hasResourcetoDelete = false
List<Resource> addResourceList = execution.getVariable("addResourceList")
List<Resource> delResourceList = execution.getVariable("delResourceList")
-
+
if(addResourceList != null && !addResourceList.isEmpty()) {
hasResourcetoAdd = true
}
-
+
if(delResourceList != null && !delResourceList.isEmpty()) {
hasResourcetoDelete = true
}
-
+
hasResourcetoUpdate = hasResourcetoAdd || hasResourcetoDelete
execution.setVariable("hasResourcetoUpdate", hasResourcetoUpdate)
-
- utils.log("DEBUG", "======== COMPLETED postCompareModelVersions Process ======== ", isDebugEnabled)
+
+ utils.log("DEBUG", "======== COMPLETED postCompareModelVersions Process ======== ", isDebugEnabled)
}
-
+
/**
* Init the service Operation Status
*/
@@ -367,28 +280,28 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
}
-
+
/**
* Update the service Operation Status
*/
- public void preUpdateServiceOperationStatus(DelegateExecution execution){
+ public void preUpdateServiceOperationStatus(DelegateExecution execution){
def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO","Entered " + method, isDebugEnabled)
-
+
try{
String serviceId = execution.getVariable("serviceInstanceId")
String operationId = execution.getVariable("operationId")
String operationType = execution.getVariable("operationType")
String serviceName = execution.getVariable("serviceInstanceName")
- String result = execution.getVariable("operationResult")
+ String result = execution.getVariable("operationResult")
String progress = execution.getVariable("progress")
String reason = execution.getVariable("operationReason")
String userId = ""
utils.log("INFO", "progress: " + progress , isDebugEnabled)
String operationContent = "Prepare service : " + execution.getVariable("operationStatus")
-
+
utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
serviceId = UriUtils.encode(serviceId,"UTF-8")
execution.setVariable("serviceInstanceId", serviceId)
@@ -421,7 +334,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
payload = utils.formatXml(payload)
execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)
-
+
}catch(Exception e){
utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
@@ -429,7 +342,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
+ }
public void sendSyncResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
@@ -438,7 +351,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
try {
String operationId = execution.getVariable("operationId")
def hasResourcetoUpdate = execution.getVariable("hasResourcetoUpdate")
-
+
String updateServiceResp = ""
if(hasResourcetoUpdate) {
// RESTResponse for API Handler (APIH) Reply Task
@@ -447,7 +360,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
else {
updateServiceResp = """{"OperationResult":"No Resource to Add or Delete or Service Instance not found in AAI."}"""
}
-
+
utils.log("INFO", " sendSyncResponse to APIH:" + "\n" + updateServiceResp, isDebugEnabled)
sendWorkflowResponse(execution, 202, updateServiceResp)
execution.setVariable("sentSyncResponse", true)
@@ -498,7 +411,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String requestId = execution.getVariable("msoRequestId")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String source = execution.getVariable("source")
-
+
String msoCompletionRequest =
"""<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1">
@@ -566,5 +479,5 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("falloutRequest", falloutRequest)
}
utils.log("INFO", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
- }
+ }
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
index 329d58aa58..329d58aa58 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstance.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
index b1aaf5ea5f..b1aaf5ea5f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
index 416d0d6e60..416d0d6e60 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
index a926030924..a926030924 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
index b7f31d7823..b7f31d7823 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
index 7b2d1b78e4..7b2d1b78e4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
index f251dc46f8..f251dc46f8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
index fd9d9cc8a3..fd9d9cc8a3 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
index 8ca2871916..8ca2871916 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
index 68d5c19b80..68d5c19b80 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index 86c5f65e8c..86c5f65e8c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
index eaf3631441..85993d6c92 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -33,6 +33,14 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import javax.ws.rs.NotFoundException
+import org.json.JSONObject
import static org.apache.commons.lang3.StringUtils.isBlank
@@ -100,7 +108,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
-
+
String requestAction = execution.getVariable("requestAction")
execution.setVariable("requestAction", requestAction)
@@ -117,20 +125,20 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
execution.setVariable("globalSubscriberId", globalSubscriberId)
execution.setVariable("globalCustomerId", globalSubscriberId)
-
+
String suppressRollback = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestInfo.suppressRollback")
execution.setVariable("disableRollback", suppressRollback)
msoLogger.debug("Incoming Suppress/Disable Rollback is: " + suppressRollback)
-
+
String productFamilyId = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestInfo.productFamilyId")
execution.setVariable("productFamilyId", productFamilyId)
msoLogger.debug("Incoming productFamilyId is: " + productFamilyId)
-
+
// extract subscriptionServiceType
String subscriptionServiceType = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
execution.setVariable("subscriptionServiceType", subscriptionServiceType)
msoLogger.debug("Incoming subscriptionServiceType is: " + subscriptionServiceType)
-
+
// extract cloud configuration
String cloudConfiguration = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.cloudConfiguration")
execution.setVariable("cloudConfiguration", cloudConfiguration)
@@ -145,7 +153,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
String sdncVersion = "1707"
execution.setVariable("sdncVersion", sdncVersion)
msoLogger.debug("sdncVersion: "+ sdncVersion)
-
+
//For Completion Handler & Fallout Handler
String requestInfo =
"""<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
@@ -155,10 +163,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
</request-info>"""
execution.setVariable(Prefix+"requestInfo", requestInfo)
-
- //Setting for Generic Sub Flows
- execution.setVariable("GENGS_type", "service-instance")
-
+
msoLogger.trace("Completed preProcessRequest DeleteVcpeResCustServiceRequest Request ")
} catch (BpmnError e) {
@@ -189,120 +194,87 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
}
}
- public void prepareServiceDelete(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- msoLogger.trace("Inside prepareServiceDelete() of DeleteVcpeResCustService ")
-
+ /**
+ * Gets the service instance and its related resources from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // confirm if ServiceInstance was found
- if ( !execution.getVariable("GENGS_FoundIndicator") )
- {
- String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- // get variable within incoming json
- String DeleteVcpeResCustServiceRequest = execution.getVariable("DeleteVcpeResCustServiceRequest");
-
- // get SI extracted by GenericGetService
- String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
-
- msoLogger.debug("serviceInstanceAaiRecord: "+serviceInstanceAaiRecord)
- serviceInstanceAaiRecord = utils.removeXmlNamespaces(serviceInstanceAaiRecord)
-
- def (TXC_found, TXC_id) = new Tuple(false, null)
- def (BRG_found, BRG_id) = new Tuple(false, null)
- List relatedVnfIdList = []
-
- for(Node rel: utils.getMultNodeObjects(serviceInstanceAaiRecord, "relationship")) {
- def relto = utils.getChildNodeText(rel, "related-to")
- def relink = utils.getChildNodeText(rel, "related-link")
- msoLogger.debug("check: "+relto+" link: "+relink)
-
- if(isBlank(relto) || isBlank(relink)) {
-
- } else if(relto == "generic-vnf") {
- def id = relink.substring(relink.indexOf("/generic-vnf/")+13)
- if(id.endsWith("/")) {
- id = id.substring(0, id.length()-1)
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ AAIResultWrapper wrapper = resourceClient.get(uri, NotFoundException.class)
+ Optional<Relationships> relationships = wrapper.getRelationships()
+
+ def (TXC_found, TXC_id) = new Tuple(false, null)
+ def (BRG_found, BRG_id) = new Tuple(false, null)
+ List relatedVnfIdList = []
+
+ if(relationships.isPresent()){
+
+ List<AAIResourceUri> vnfUris = relationships.get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)
+ for(AAIResourceUri u:vnfUris){
+ Map<String, String> keys = u.getURIKeys()
+ String vnfId = keys.get("vnf-id")
+ relatedVnfIdList.add(vnfId)
}
-
- relatedVnfIdList.add(id)
-
- } else if(relto == "allotted-resource") {
- def (type, id) = getAaiAr(execution, relink)
-
- if(isBlank(type) || isBlank(id)) {
-
- } else if(type == "TunnelXConn" || type == "Tunnel XConn") {
- msoLogger.debug("TunnelXConn AR found")
- TXC_found = true
- TXC_id = id
-
- } else if(type == "BRG") {
- msoLogger.debug("BRG AR found")
- BRG_found = true
- BRG_id = id
+ List<AAIResourceUri> arUris = relationships.get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+ for(AAIResourceUri u:arUris){
+ String ar = resourceClient.get(u).getJson()
+
+ def type = jsonUtil.getJsonValue(ar, "type")
+ def id = jsonUtil.getJsonValue(ar, "id")
+
+ if(type == "TunnelXConn" || type == "Tunnel XConn") {
+ msoLogger.debug("TunnelXConn AR found")
+ TXC_found = true
+ TXC_id = id
+
+ }else if(type == "BRG") {
+ msoLogger.debug("BRG AR found")
+ BRG_found = true
+ BRG_id = id
+ }
+
+ execution.setVariable(Prefix+"TunnelXConn", TXC_found)
+ execution.setVariable("TXC_allottedResourceId", TXC_id)
+ msoLogger.debug("TXC_allottedResourceId: " + TXC_id)
+
+ execution.setVariable(Prefix+"BRG", BRG_found)
+ execution.setVariable("BRG_allottedResourceId", BRG_id)
+ msoLogger.debug("BRG_allottedResourceId: " + BRG_id)
+
}
}
+
+ execution.setVariable(Prefix+"vnfsCount", relatedVnfIdList.size())
+ if(relatedVnfIdList.size() > 0) {
+ execution.setVariable(Prefix+"relatedVnfIdList", relatedVnfIdList)
+ }
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
}
-
- execution.setVariable(Prefix+"TunnelXConn", TXC_found)
- execution.setVariable("TXC_allottedResourceId", TXC_id)
- msoLogger.debug("TXC_allottedResourceId: " + TXC_id)
-
- execution.setVariable(Prefix+"BRG", BRG_found)
- execution.setVariable("BRG_allottedResourceId", BRG_id)
- msoLogger.debug("BRG_allottedResourceId: " + BRG_id)
-
- int vnfsCount = relatedVnfIdList.size()
- execution.setVariable(Prefix+"vnfsCount", vnfsCount)
- msoLogger.debug(" "+Prefix+"vnfsCount : " + vnfsCount)
- if(vnfsCount > 0) {
- execution.setVariable(Prefix+"relatedVnfIdList", relatedVnfIdList)
- }
-
- msoLogger.trace("Completed prepareServiceDelete() of DeleteVcpeResCustService ")
- } catch (BpmnError e){
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- sendSyncError(execution)
- String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. prepareServiceDelete() - " + ex.getMessage()
- msoLogger.debug(exceptionMessage)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- private getAaiAr(DelegateExecution execution, String relink) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
- AaiUtil aaiUtil = new AaiUtil(this)
- String aaiEndpoint = UrnPropertiesReader.getVariable("aai.endpoint",execution) + relink
-
- msoLogger.debug("get AR info " + aaiEndpoint)
- APIResponse response = aaiUtil.executeAAIGetCall(execution, aaiEndpoint)
-
- int responseCode = response.getStatusCode()
- msoLogger.debug("get AR info responseCode:" + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- msoLogger.debug("get AR info " + aaiResponse)
-
- if(responseCode < 200 || responseCode >= 300 || isBlank(aaiResponse)) {
- return new Tuple2(null, null)
+ }catch(NotFoundException e) {
+ msoLogger.debug("Service Instance does not exist AAI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance was not found in aai")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
-
- def type = utils.getNodeText(aaiResponse, "type")
- def id = utils.getNodeText(aaiResponse, "id")
-
- return new Tuple2(type, id)
}
-
-
+
+
// *******************************
- //
+ //
// *******************************
public void prepareVnfAndModulesDelete (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable(DebugFlag)
@@ -316,7 +288,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
if (vnfList.size() > 0 ) {
vnfId = vnfList.get(vnfsDeletedCount.intValue())
}
-
+
execution.setVariable("vnfId", vnfId)
msoLogger.debug("need to delete vnfId:" + vnfId)
@@ -327,7 +299,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
}
-
+
// *******************************
// Validate Vnf request Section -> increment count
// *******************************
@@ -338,9 +310,9 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
try {
int vnfsDeletedCount = execution.getVariable(Prefix+"vnfsDeletedCount")
vnfsDeletedCount++
-
+
execution.setVariable(Prefix+"vnfsDeletedCount", vnfsDeletedCount)
-
+
msoLogger.debug(" ***** Completed validateVnfDelete of DeleteVcpeResCustService ***** "+" vnf # "+vnfsDeletedCount)
} catch (Exception ex) {
// try error in method block
@@ -349,7 +321,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
}
}
-
+
// *****************************************
// Prepare Completion request Section
// *****************************************
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index 8a8aa2b2ad..3c08779513 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -37,12 +37,19 @@ import static org.apache.commons.lang3.StringUtils.*
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
-
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
/**
* This groovy class supports the <class>DoCreateAllottedResourceBRG.bpmn</class> process.
*
* @author
- *
+ *
* Inputs:
* @param - msoRequestId
* @param - isDEbugLogEnabled
@@ -57,15 +64,15 @@ import org.onap.so.logger.MsoLogger
* @param - allottedResourceRole
* @param - allottedResourceType
* @param - brgWanMacAddress
- * @param - vni
- * @param - vgmuxBearerIP
+ * @param - vni
+ * @param - vgmuxBearerIP
*
* Outputs:
* @param - rollbackData (localRB->null)
* @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
* @param - WorkflowException - O
* @param - allottedResourceId
- * @param - allottedResourceName
+ * @param - allottedResourceName
*
*/
public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
@@ -155,6 +162,33 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.trace("end preProcessRequest")
}
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("CSI_resourceLink", uri.build().toString())
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit getServiceInstance ")
+ }
+
public void getAaiAR (DelegateExecution execution) {
@@ -193,6 +227,39 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.trace("end getAaiAR")
}
+ public void getParentServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getParentServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('parentServiceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.NODES_QUERY, "").queryParam("search-node-type", "service-instance").queryParam("filter", "service-instance-id:EQUALS:" + serviceInstanceId)
+ String json = resourceClient.get(uri).getJson()
+
+ JSONObject obj = new JSONObject(json)
+ if(obj.has("result-data")){
+ JSONObject ob = obj.getJSONArray("result-data").getJSONObject(0)
+ String resourceLink = ob.getString("resource-link")
+
+ String[] split = resourceLink.split("/aai/")
+ String siRelatedLink = "/aai/" + split[1]
+
+ execution.setVariable("PSI_resourceLink", resourceLink)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getParentServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit getParentServiceInstance ")
+ }
+
+
public void createAaiAR(DelegateExecution execution) {
@@ -387,9 +454,9 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
<global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
</service-information>
<allotted-resource-information>
- <allotted-resource-id>${MsoUtils.xmlEscape(allottedResourceId)}</allotted-resource-id>
+ <allotted-resource-id>${MsoUtils.xmlEscape(allottedResourceId)}</allotted-resource-id>
<allotted-resource-type>brg</allotted-resource-type>
- <parent-service-instance-id>${MsoUtils.xmlEscape(parentServiceInstanceId)}</parent-service-instance-id>
+ <parent-service-instance-id>${MsoUtils.xmlEscape(parentServiceInstanceId)}</parent-service-instance-id>
<onap-model-information>
<model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantId)}</model-invariant-uuid>
<model-uuid>${MsoUtils.xmlEscape(modelUUId)}</model-uuid>
@@ -575,7 +642,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String sdncRequestId = UUID.randomUUID().toString()
-
+
//neeed the same url as used by vfmodules
String SDNCGetRequest =
"""<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
@@ -600,7 +667,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
}
msoLogger.trace("end preProcessSDNCGet")
}
-
+
public void updateAaiAROrchStatus(DelegateExecution execution, String status){
msoLogger.trace("start updateAaiAROrchStatus")
@@ -609,7 +676,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
msoLogger.trace("end updateAaiAROrchStatus")
}
-
+
public void generateOutputs(DelegateExecution execution)
{
@@ -619,7 +686,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.debug("resp:" + sdncGetResponse)
String arData = utils.getNodeXml(sdncGetResponse, "brg-topology")
arData = utils.removeXmlNamespaces(arData)
-
+
String brga = utils.getNodeXml(arData, "brg-assignments")
String ari = utils.getNodeXml(arData, "allotted-resource-identifiers")
execution.setVariable("allotedResourceName", utils.getNodeText(ari, "allotted-resource-name"))
@@ -630,7 +697,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.debug(msg)
}
msoLogger.trace("end generateOutputs")
-
+
}
public void preProcessRollback (DelegateExecution execution) {
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
index 4d4f11c3e5..4d4f11c3e5 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index 5f9b4b8ecd..5f9b4b8ecd 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
index 24b919524f..24b919524f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
index a5125fea73..a5125fea73 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
index 7ce606e685..7ce606e685 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
index bb490a06e4..61b1ca4cae 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
@@ -20,6 +20,7 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
+import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
@@ -30,12 +31,15 @@ public class InformDmaapClient implements JavaDelegate {
private DmaapClient dmaapClient;
@Override
- public void execute(DelegateExecution execution) throws Exception {
+ public void execute(DelegateExecution execution) {
String correlationId = (String) execution.getVariable(ExecutionVariableNames.CORRELATION_ID);
- dmaapClient.registerForUpdate(correlationId, () -> execution.getProcessEngineServices().getRuntimeService()
+ RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
+ dmaapClient.registerForUpdate(correlationId, () ->
+ runtimeService
.createMessageCorrelation("WorkflowMessage")
.processInstanceBusinessKey(execution.getProcessBusinessKey())
- .correlateWithResult());
+ .correlateWithResult()
+ );
}
@Autowired
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index bd781756a5..7226feb552 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -20,6 +20,7 @@
package org.onap.so.bpmn.infrastructure.workflow.service;
+import org.json.JSONObject;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
@@ -27,7 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-
+import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.apache.http.client.HttpClient;
@@ -45,6 +46,7 @@ import org.apache.http.util.EntityUtils;
import org.camunda.bpm.engine.runtime.Execution;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.domain.Resource;
import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
@@ -61,6 +63,8 @@ public class ServicePluginFactory {
public static final String OOF_Default_EndPoint = "http://192.168.1.223:8443/oof/sotncalc";
public static final String Third_SP_Default_EndPoint = "http://192.168.1.223:8443/sp/resourcemgr/querytps";
+
+ public static final String Inventory_OSS_Default_EndPoint = "http://192.168.1.199:8443/oss/inventory";
private static final int DEFAULT_TIME_OUT = 60000;
@@ -77,7 +81,15 @@ public class ServicePluginFactory {
}
return instance;
}
+
+ private ServicePluginFactory() {
+
+ }
+
+ private String getInventoryOSSEndPoint(){
+ return UrnPropertiesReader.getVariable("mso.service-plugin.inventory-oss-endpoint", Inventory_OSS_Default_EndPoint);
+ }
private String getThirdSPEndPoint(){
return UrnPropertiesReader.getVariable("mso.service-plugin.third-sp-endpoint", Third_SP_Default_EndPoint);
}
@@ -86,6 +98,60 @@ public class ServicePluginFactory {
return UrnPropertiesReader.getVariable("mso.service-plugin.oof-calc-endpoint", OOF_Default_EndPoint);
}
+ public ServiceDecomposition doProcessSiteLocation(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+ ServiceDecomposition serviceDecompositionforLocal = serviceDecomposition;
+
+ if (isSiteLocationLocal(serviceDecomposition, uuiRequest)) {
+ return serviceDecomposition;
+ }
+
+ List<Resource> addResourceList = serviceDecomposition.getServiceResources();
+ for (Resource resource : addResourceList) {
+ String resourcemodelName = resource.getModelInfo().getModelName();
+ if (!StringUtils.containsIgnoreCase(resourcemodelName, "sp-partner")) {
+ serviceDecompositionforLocal.deleteResource(resource);
+ break;
+ }
+ if (!StringUtils.containsIgnoreCase(resourcemodelName, "sppartner")) {
+ serviceDecompositionforLocal.deleteResource(resource);
+ break;
+ }
+ }
+
+ return serviceDecompositionforLocal;
+ }
+
+ public boolean isSiteLocationLocal(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+ boolean isSiteLocationLocal = true;
+
+ String serviceModelName = serviceDecomposition.getModelInfo().getModelName();
+ String serviceParameters = JsonUtils.getJsonValue(uuiRequest, "service.parameters");
+ String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs");
+ JSONObject inputParameters = new JSONObject(requestInputs);
+
+ if(StringUtils.containsIgnoreCase(serviceModelName, "site") && inputParameters.has("location"))
+ {
+ Object location = inputParameters.get("location");
+ JSONObject locationObj = new JSONObject(location);
+ String locationONAP = queryLocationFromInventoryOSS(locationObj);
+ if(StringUtils.containsIgnoreCase(locationONAP, "remote")) {
+ isSiteLocationLocal = false;
+ }
+ }
+
+ return isSiteLocationLocal;
+ }
+
+ private String queryLocationFromInventoryOSS(JSONObject locationObj) {
+ String reqContent = getJsonString(locationObj);
+ String url = getInventoryOSSEndPoint();
+ String responseContent = sendRequest(url, "POST", reqContent);
+ String locationONAP = "";
+ if (null != responseContent) {
+ locationONAP = getJsonObject(responseContent, String.class);
+ }
+ return locationONAP;
+ }
public String preProcessService(ServiceDecomposition serviceDecomposition, String uuiRequest) {
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
index ae40e9d7c6..ae40e9d7c6 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
index da0990910a..da0990910a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateGenericAlaCarteServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
index 4d5f506599..4d5f506599 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
index 77220da94f..77220da94f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfraTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
index 2b437d875e..2b437d875e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
index 95259e9ec0..95259e9ec0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
index b459710479..b459710479 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteGenericAlaCarteServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
index 9b7d7ee21f..9b7d7ee21f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
index 0bce32716f..0bce32716f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
index 72f79c80d9..72f79c80d9 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
index 5ee10bc931..5ee10bc931 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
index 0a1f8f2859..0a1f8f2859 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
index cc6f89865f..cc6f89865f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
index 6d9d5e5356..6d9d5e5356 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
index c5c6187648..c5c6187648 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
index 30e3779b53..30e3779b53 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
index 91e7086bd3..91e7086bd3 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
index 9b421d8b63..9b421d8b63 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
index bbbb82b5aa..bbbb82b5aa 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
index 5e264c0af4..5e264c0af4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
index 1a2d16d9d0..1a2d16d9d0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
index a8bdfb0633..a8bdfb0633 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
index fcb0fb0940..fcb0fb0940 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnfTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
index 3390b1a6f0..3390b1a6f0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
index 730be14df0..730be14df0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2Test.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
index 0b95ffc053..0b95ffc053 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModulesTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
index 4e993525f9..4e993525f9 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
index 0189d065df..0189d065df 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
index de3db5b5a8..de3db5b5a8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
index beaebceaf7..beaebceaf7 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
index ba54787dc1..ba54787dc1 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModulesTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
index e196a62e1f..e196a62e1f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
index fd3c1e352f..fd3c1e352f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateNetworkInstanceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
index 620b0b787d..620b0b787d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
index 523c791efc..523c791efc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustServiceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
index b7c754938a..b7c754938a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustServiceTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
index 1e8842e68f..1e8842e68f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
index 543bb1db05..543bb1db05 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
index 66cfdb635d..66cfdb635d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollbackTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
index fa40c17e63..fa40c17e63 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
index e8004d3d2b..e8004d3d2b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRGTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
index 6719be17a1..6719be17a1 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXCTest.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
index 764e6244d4..764e6244d4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/GroovyTestBase.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
index fa5dcec4bc..fa5dcec4bc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapGetter.groovy
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
index 7b50c616ea..7b50c616ea 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/vcpe/scripts/MapSetter.groovy
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json b/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
index eb2d9faa2a..0a211e6b08 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/resources/__files/InfrastructureFlows/VnfInPlaceUpdate_VID_request.json
@@ -10,7 +10,7 @@
},
"requestParameters": {
"payload":
-"{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+"{\"existing_software_version\": \"3.1\",\"new_software_version\": \"3.2\", \"operations_timeout\": \"3600\"}"
}
}
} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml
index ee51ecd66e..1a3a64bcc8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml
@@ -73,15 +73,15 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
- <execution>
+ <execution>
<id>default-test</id>
<goals>
<goal>test</goal>
</goals>
- <configuration>
- <includes>
- <include>**/AllTestsTestSuite.java</include>
- </includes>
+ <configuration>
+ <includes>
+ <include>**/AllTestsTestSuite.java</include>
+ </includes>
</configuration>
</execution>
<execution>
@@ -89,23 +89,23 @@
<goals>
<goal>test</goal>
</goals>
- <configuration>
- <includes>
- <include>**/AllTasksTestsTestSuite.java</include>
- </includes>
+ <configuration>
+ <includes>
+ <include>**/AllTasksTestsTestSuite.java</include>
+ </includes>
</configuration>
</execution>
<execution>
- <id>bpmn-test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/AllBPMNTestSuites.java</include>
- </includes>
- </configuration>
- </execution>
+ <id>bpmn-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>**/AllBPMNTestSuites.java</include>
+ </includes>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
@@ -134,9 +134,14 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
@@ -145,18 +150,18 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- <version>3.1.12</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
- <version>3.1.12</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- <version>3.1.11</version>
- </dependency>
+ <version>${cxf.version}</version>
+ </dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -206,10 +211,10 @@
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
- <version>2.0</version>
+ <version>${jax.ws.rs}</version>
</dependency>
<dependency>
- <groupId>org.onap.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSORESTClient</artifactId>
<version>${project.version}</version>
</dependency>
@@ -243,17 +248,17 @@
<artifactId>javax.annotation-api</artifactId>
<version>1.3</version>
</dependency>
- <dependency>
- <groupId>org.onap.msb.java-sdk</groupId>
- <artifactId>msb-java-sdk</artifactId>
- <version>1.0.0</version>
- <exclusions>
- <exclusion>
- <groupId>com.eclipsesource.jaxrs</groupId>
- <artifactId>jersey-all</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>org.onap.msb.java-sdk</groupId>
+ <artifactId>msb-java-sdk</artifactId>
+ <version>1.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.eclipsesource.jaxrs</groupId>
+ <artifactId>jersey-all</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -271,16 +276,16 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
</dependency>
<dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
+ <groupId>ch.vorburger.mariaDB4j</groupId>
+ <artifactId>mariaDB4j</artifactId>
+ <version>2.2.3</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollbackV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollbackV2.groovy
deleted file mode 100644
index 6e1a5dcb55..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceRollbackV2.groovy
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.infrastructure.scripts
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.camunda.bpm.engine.runtime.Execution
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.client.orchestration.AAIServiceInstanceResources
-import org.onap.so.logger.MsoLogger
-
-
-public class DoCreateServiceInstanceRollbackV2 extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateServiceInstanceRollbackV2.class);
-
- @Override
- public void preProcessRequest(DelegateExecution execution) {
-
- }
-
- public void aaiServiceInstanceRollback (DelegateExecution execution) {
- def aaiServiceInstanceRollback = execution.getVariable("aaiServiceInstanceRollback")
- if(aaiServiceInstanceRollback){
- msoLogger.trace("Started aaiServiceInstanceRollback")
- try{
- ServiceDecomposition serviceDecomp = execution.getVariable("ServiceDecomposition")
- AAIServiceInstanceResources aaiO = new AAIServiceInstanceResources()
- aaiO.deleteServiceInstance(serviceDecomp)
- }catch (Exception ex) {
- String msg = "Error Response from AAI for aaiServiceInstanceRollback"
- execution.setVariable("rollbackError", msg)
- msoLogger.debug(msg)
- throw new BpmnError("MSOWorkflowException")
- }
- msoLogger.trace("Completed aaiServiceInstanceRollback")
- }else{
- msoLogger.trace("SKIPPING A&AI ROLLBACK")
- }
- }
-
- public void rollbackError (DelegateExecution execution) {
- msoLogger.trace("rollbackError")
- try{
- msoLogger.debug("Caught an Exception in DoCreateServiceInstanceRollbackV2")
- }catch(BpmnError b){
- msoLogger.debug("BPMN Error during rollbackError: " + b.getMessage())
- }catch(Exception e){
- msoLogger.debug("Caught Exception during rollbackError: " + e.getMessage())
- }
- msoLogger.debug(" Exit processRollbackException")
- }
-
-}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceV2.groovy
deleted file mode 100644
index 8af8e6ba1b..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstanceV2.groovy
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.infrastructure.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.delegate.DelegateExecution
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.client.orchestration.AAIServiceInstanceResources
-import org.onap.so.client.orchestration.SDNCServiceInstanceResources
-import org.onap.so.logger.MsoLogger
-import org.onap.so.logger.MessageEnum
-
-import groovy.json.*
-
-/**
- * This groovy class supports the <class>DoCreateServiceInstanceV2.bpmn</class> process.
- *
-*/
-
-public class DoCreateServiceInstanceV2 extends AbstractServiceTaskProcessor {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateServiceInstanceV2.class);
- AAIServiceInstanceResources aaiO = new AAIServiceInstanceResources()
- SDNCServiceInstanceResources sdncO = new SDNCServiceInstanceResources()
-
- @Override
- public void preProcessRequest(DelegateExecution execution) {
- }
-
- public void createServiceInstance(DelegateExecution execution) {
- execution.setVariable("callSDNC",true)
- if(execution.getVariable("serviceType").equalsIgnoreCase("PORT-MIRROR")== false){
- if(execution.getVariable("sdncVersion").equals("1610")){
- execution.setVariable("callSDNC",false);
- }
- }
- ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
- try{
- aaiO.createServiceInstance(serviceDecomp)
- } catch (BpmnError e) {
- throw e
- }
- }
-
- public void createProject(DelegateExecution execution) {
- ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
- if (serviceDecomp.getServiceInstance() != null && serviceDecomp.getProject() != null) {
- try{
- aaiO.createProjectandConnectServiceInstance(serviceDecomp)
- } catch (BpmnError e) {
- throw e
- }
- }
- }
-
- public void createOwningEntity(DelegateExecution execution) {
- ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
- if (serviceDecomp.getServiceInstance() != null && serviceDecomp.getOwningEntity() != null) {
- try{
- aaiO.createOwningEntityandConnectServiceInstance(serviceDecomp)
- } catch (BpmnError e) {
- throw e
- }
- }
- }
-
- public void sdncAssignRequest(DelegateExecution execution) {
- ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
- if (serviceDecomp != null) {
- try {
- sdncO.sendSyncResponse(serviceDecomp)
- } catch (BpmnError e) {
- throw e
- }
- }
-
- }
-
- public void rollback(DelegateExecution execution) {
- //TODO
- }
-
-}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
index 5cf17d24fe..21f18e9fa2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn
@@ -1,41 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
- <bpmn:process id="Create3rdONAPE2EServiceInstance" name="Create3rdONAPE2EServiceInstance " isExecutable="true">
- <bpmn:startEvent id="StartEvent_0hj12gh" name="Delete3rdONAPRES_Start">
+ <bpmn:process id="Create3rdONAPE2EServiceInstance" name="Create3rdONAPE2EServiceInstance" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_0hj12gh" name="Create3rdONAPRES_Start">
<bpmn:outgoing>SequenceFlow_190fewc</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:scriptTask id="ScriptTask_0rs5t7w" name="prepare 3rdONAP Delete Request" scriptFormat="groovy">
+ <bpmn:scriptTask id="ScriptTask_0rs5t7w" name="prepare 3rdONAP Create Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0mmu3kz</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_15mvx68</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.prepare3rdONAPRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:endEvent id="EndEvent_013449q" name="Delete3rdONAPRES_End">
+ <bpmn:endEvent id="EndEvent_013449q" name="Create3rdONAPRES_End">
<bpmn:incoming>SequenceFlow_0a8k9xi</bpmn:incoming>
</bpmn:endEvent>
<bpmn:scriptTask id="ScriptTask_1b88nnk" name="Save SPPartner In AAI">
<bpmn:incoming>SequenceFlow_0y2g8mr</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0znwu8z</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.saveSPPartnerInAAI(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_16rcjl3" name="Pre Process Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1ttrqml</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0brxjic</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_10n1tb6" name="Init Delete resource progress" scriptFormat="groovy">
+ <bpmn:scriptTask id="ScriptTask_10n1tb6" name="Init Create resource progress" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0brxjic</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ezt5f0</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
execution.setVariable("progress", "5")
execution.setVariable("status", "processing")
execution.setVariable("statusDescription", "Start Creating")
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="ServiceTask_039ju3f" name="resource progress update">
@@ -64,15 +64,15 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_0znwu8z</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_04hwfll</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def csi = new Delete3rdONAPE2EServiceInstance()
+def csi = new Create3rdONAPE2EServiceInstance()
csi.postProcess(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0r2cxvb" name="Delete E2ESI in 3rdONAP" scriptFormat="groovy">
+ <bpmn:scriptTask id="ScriptTask_0r2cxvb" name="Create E2ESI in 3rdONAP" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_15mvx68</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0wp73cw</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
+def dcsi = new Create3rdONAPE2EServiceInstance()
+dcsi.doCreateE2ESIin3rdONAP(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="ServiceTask_0p5029r" name="resource progress update">
<bpmn:extensionElements>
@@ -100,7 +100,7 @@ dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_1suwdgi</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0mmu3kz</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.allocateCrossONAPResource(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_190fewc" sourceRef="StartEvent_0hj12gh" targetRef="ScriptTask_160sboy" />
@@ -111,7 +111,7 @@ dcsi.allocateCrossONAPResource(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_190fewc</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1f71u71</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.checkSPPartnerInfo(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_01c0nhq" name="Is 3rdONAP SPPartner Existing" default="SequenceFlow_0h1rnsw">
@@ -123,22 +123,22 @@ dcsi.checkSPPartnerInfo(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_1msw3xo" name="yes" sourceRef="ExclusiveGateway_01c0nhq" targetRef="ScriptTask_1y8kdt3">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("Is3rdONAPExist" ) == "true" )}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0cql41g" name="Start3rdONAPDeleteE2ESI">
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0cql41g" name="Start3rdONAPCreateE2ESI">
<bpmn:outgoing>SequenceFlow_1ttrqml</bpmn:outgoing>
- <bpmn:linkEventDefinition name="Start3rdONAPDeleteE2ESI" />
+ <bpmn:linkEventDefinition name="Start3rdONAPCreateE2ESI" />
</bpmn:intermediateCatchEvent>
<bpmn:sequenceFlow id="SequenceFlow_1f71u71" sourceRef="ScriptTask_160sboy" targetRef="ExclusiveGateway_01c0nhq" />
<bpmn:sequenceFlow id="SequenceFlow_1ttrqml" sourceRef="IntermediateCatchEvent_0cql41g" targetRef="ScriptTask_16rcjl3" />
- <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0wbo4nq" name="GoTo Start3rdONAPDeleteE2ESI">
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0wbo4nq" name="GoTo Start3rdONAPCreateE2ESI">
<bpmn:incoming>SequenceFlow_0o376do</bpmn:incoming>
- <bpmn:linkEventDefinition name="Start3rdONAPDeleteE2ESI" />
+ <bpmn:linkEventDefinition name="Start3rdONAPCreateE2ESI" />
</bpmn:intermediateThrowEvent>
<bpmn:scriptTask id="ScriptTask_0yz8d8c" name="Query E2ESI progress in 3rdONAP" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_13s0mg5</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0kkou66</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0fkfn70</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.getE2ESIProgressin3rdONAP(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_04hwfll" sourceRef="ScriptTask_1aj6okk" targetRef="ScriptTask_18auy29" />
@@ -146,7 +146,7 @@ dcsi.getE2ESIProgressin3rdONAP(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_1msw3xo</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1kcu53z</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.checkLocallCall(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1kcu53z" sourceRef="ScriptTask_1y8kdt3" targetRef="ExclusiveGateway_0pj14lp" />
@@ -159,36 +159,36 @@ dcsi.checkLocallCall(execution)]]></bpmn:script>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("IsLocalCall" ) == "true" )}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1y8xkzy" name="no" sourceRef="ExclusiveGateway_0pj14lp" targetRef="IntermediateThrowEvent_1y4vypx" />
- <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1y4vypx" name="GoTo StartLocalONAPDeleteE2ESI">
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1y4vypx" name="GoTo StartLocalONAPCreateE2ESI">
<bpmn:incoming>SequenceFlow_1y8xkzy</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0h1rnsw</bpmn:incoming>
- <bpmn:linkEventDefinition name="StartLocalONAPDeleteE2ESI" />
+ <bpmn:linkEventDefinition name="StartLocalONAPCreateE2ESI" />
</bpmn:intermediateThrowEvent>
- <bpmn:endEvent id="EndEvent_0o0n3fa" name="Delete3rdONAPRES_End">
+ <bpmn:endEvent id="EndEvent_0o0n3fa" name="Create3rdONAPRES_End">
<bpmn:incoming>SequenceFlow_131f1jj</bpmn:incoming>
</bpmn:endEvent>
<bpmn:scriptTask id="ScriptTask_1lazb8l" name="Save SPPartner In AAI">
<bpmn:incoming>SequenceFlow_1wq9f5k</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_18gb81f</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.saveSPPartnerInAAI(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_0buj724" name="Pre Process Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0wnyy50</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0z9axn6</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0rixvgj" name="Prepare Delete resource progress" scriptFormat="groovy">
+ <bpmn:scriptTask id="ScriptTask_0rixvgj" name="Prepare Create resource progress" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0z9axn6</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_04l4to1</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
execution.setVariable("progress", "100")
execution.setVariable("status", "finished")
execution.setVariable("statusDescription", "Local Creation Only")
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="ServiceTask_1kgvq5e" name="update progress update">
@@ -218,18 +218,18 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_0dkbe3r</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1wn6y9u</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def csi = new Delete3rdONAPE2EServiceInstance()
+def csi = new Create3rdONAPE2EServiceInstance()
csi.postProcess(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_18h4prx" name="StartLocalONAPDeleteE2ESI">
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_18h4prx" name="StartLocalONAPCreateE2ESI">
<bpmn:outgoing>SequenceFlow_0wnyy50</bpmn:outgoing>
- <bpmn:linkEventDefinition name="StartLocalONAPDeleteE2ESI" />
+ <bpmn:linkEventDefinition name="StartLocalONAPCreateE2ESI" />
</bpmn:intermediateCatchEvent>
<bpmn:scriptTask id="ScriptTask_03gddkg" name="Send Sync Ack Response" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1wn6y9u</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_131f1jj</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def csi = new Delete3rdONAPE2EServiceInstance()
+def csi = new Create3rdONAPE2EServiceInstance()
csi.sendSyncResponse(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0z9axn6" sourceRef="ScriptTask_0buj724" targetRef="ScriptTask_0rixvgj" />
@@ -252,15 +252,15 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_1udji9x</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0kkou66</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.timeDelay(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_1662gjm" name="Delete SI in 3rdONAP Success?" default="SequenceFlow_12seu6n">
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1662gjm" name="Create SI in 3rdONAP Success?" default="SequenceFlow_12seu6n">
<bpmn:incoming>SequenceFlow_0wp73cw</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_13s0mg5</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_12seu6n</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:exclusiveGateway id="ExclusiveGateway_1we7izu" name="Delete SI in 3rdONAP Finished?">
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1we7izu" name="Create SI in 3rdONAP Finished?">
<bpmn:incoming>SequenceFlow_1luhljs</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1udji9x</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0y2g8mr</bpmn:outgoing>
@@ -269,7 +269,7 @@ dcsi.timeDelay(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_04hwfll</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0a8k9xi</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def csi = new Delete3rdONAPE2EServiceInstance()
+def csi = new Create3rdONAPE2EServiceInstance()
csi.sendSyncResponse(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0a8k9xi" sourceRef="ScriptTask_18auy29" targetRef="EndEvent_013449q" />
@@ -299,8 +299,8 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
execution.setVariable("progress", "100")
execution.setVariable("status", "error")
-execution.setVariable("statusDescription", "Delete Service Order failed ")
-def dcsi = new Delete3rdONAPE2EServiceInstance()
+execution.setVariable("statusDescription", "Create Service Order failed ")
+def dcsi = new Create3rdONAPE2EServiceInstance()
dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="ServiceTask_1ixmamy" name="resource progress update">
@@ -330,7 +330,7 @@ dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:process>
<bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Delete3rdONAPE2EServiceInstance">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Create3rdONAPE2EServiceInstance">
<bpmndi:BPMNShape id="StartEvent_0hj12gh_di" bpmnElement="StartEvent_0hj12gh">
<dc:Bounds x="-9" y="-418" width="36" height="36" />
<bpmndi:BPMNLabel>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn
new file mode 100644
index 0000000000..3e2c316ffc
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateDeviceResource.bpmn
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+ <bpmn:process id="CreateDeviceResource.bpmn" name="CreateDeviceResource.bpmn" isExecutable="true">
+ <bpmn:endEvent id="EndEvent_1x6k78c" name="create Dev end">
+ <bpmn:incoming>SequenceFlow_0auvfvm</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_05niqbf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0auvfvm</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateDeviceResource.bpmn()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05niqbf" sourceRef="Task_0bga3e8" targetRef="ScriptTask_1g5zyi6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0auvfvm" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
+ <bpmn:callActivity id="Task_0bga3e8" name="call Create SDNC Network Resource" calledElement="CreateSDNCNetworkResource">
+ <bpmn:extensionElements>
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="resourceInput" target="resourceInput" />
+ <camunda:in source="recipeParamXsd" target="recipeParamXsd" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="svcAction" target="svcAction" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="networkRequest" target="networkRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1gu13by</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05niqbf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:startEvent id="StartEvent_1vjxae6" name="createDev_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1rwaeun</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1caax8u" name="GoTo StartCreateDevinSDNC">
+ <bpmn:incoming>SequenceFlow_1ylvnxq</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartCreateDevinSDNC" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:scriptTask id="ScriptTask_00y93jj" name="Check DevType" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rq2jb1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hp2h5t</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateDeviceResource()
+dcsi.checkDevType(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0kba700" name="Dev Type" default="SequenceFlow_076ma0v">
+ <bpmn:incoming>SequenceFlow_1hp2h5t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ss02ik</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0h4378g</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_076ma0v</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1chnlq6" name="GoTo StartCreateDevinSDNC">
+ <bpmn:incoming>SequenceFlow_0h4378g</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartCreateDevinSDNC" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1ss02ik" name="VNF" sourceRef="ExclusiveGateway_0kba700" targetRef="ScriptTask_02rli65">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("device_class" ) == "VNF" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1hp2h5t" sourceRef="ScriptTask_00y93jj" targetRef="ExclusiveGateway_0kba700" />
+ <bpmn:sequenceFlow id="SequenceFlow_0h4378g" name="PNF" sourceRef="ExclusiveGateway_0kba700" targetRef="IntermediateThrowEvent_1chnlq6">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("device_class" ) == "PNF" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1rwaeun" sourceRef="StartEvent_1vjxae6" targetRef="ScriptTask_14dav1d" />
+ <bpmn:scriptTask id="ScriptTask_14dav1d" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1rwaeun</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0rq2jb1</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateDeviceResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0rq2jb1" sourceRef="ScriptTask_14dav1d" targetRef="ScriptTask_00y93jj" />
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0slgrxw" name="StartCreateDevinSDNC">
+ <bpmn:outgoing>SequenceFlow_1gu13by</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="StartCreateDevinSDNC" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1gu13by" sourceRef="IntermediateCatchEvent_0slgrxw" targetRef="Task_0bga3e8" />
+ <bpmn:callActivity id="CallActivity_0pyrfca" name="call CreateVNF" calledElement="DoCreateVNF">
+ <bpmn:extensionElements>
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="resourceInput" target="resourceInput" />
+ <camunda:in source="recipeParamXsd" target="recipeParamXsd" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="svcAction" target="svcAction" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="networkRequest" target="networkRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0pg3072</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0pkp4ce</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0pkp4ce" sourceRef="CallActivity_0pyrfca" targetRef="ScriptTask_0u1piih" />
+ <bpmn:endEvent id="EndEvent_0ymfq61">
+ <bpmn:incoming>SequenceFlow_076ma0v</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_076ma0v" sourceRef="ExclusiveGateway_0kba700" targetRef="EndEvent_0ymfq61" />
+ <bpmn:scriptTask id="ScriptTask_02rli65" name="Get VNF Template fom SDC" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ss02ik</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0pg3072</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateDeviceResource()
+dcsi.getVNFTemplatefromSDC(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0pg3072" sourceRef="ScriptTask_02rli65" targetRef="CallActivity_0pyrfca" />
+ <bpmn:scriptTask id="ScriptTask_0u1piih" name="Post VNF info process " scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0pkp4ce</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ylvnxq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateDeviceResource()
+dcsi.postVNFInfoProcess(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1ylvnxq" sourceRef="ScriptTask_0u1piih" targetRef="IntermediateThrowEvent_1caax8u" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateDeviceResource.bpmn">
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="1026" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="153" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+ <dc:Bounds x="494" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05niqbf_di" bpmnElement="SequenceFlow_05niqbf">
+ <di:waypoint xsi:type="dc:Point" x="191" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="494" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297.5" y="104" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0auvfvm_di" bpmnElement="SequenceFlow_0auvfvm">
+ <di:waypoint xsi:type="dc:Point" x="594" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="765" y="104" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0aywvn3_di" bpmnElement="Task_0bga3e8">
+ <dc:Bounds x="91" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1vjxae6_di" bpmnElement="StartEvent_1vjxae6">
+ <dc:Bounds x="-188" y="-145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-211" y="-109" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1caax8u_di" bpmnElement="IntermediateThrowEvent_1caax8u">
+ <dc:Bounds x="1026" y="-145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1009" y="-104" width="78" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00y93jj_di" bpmnElement="ScriptTask_00y93jj">
+ <dc:Bounds x="141" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0kba700_di" bpmnElement="ExclusiveGateway_0kba700" isMarkerVisible="true">
+ <dc:Bounds x="334" y="-152" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="-166" width="34" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1chnlq6_di" bpmnElement="IntermediateThrowEvent_1chnlq6">
+ <dc:Bounds x="341" y="-28" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="325" y="13" width="78" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ss02ik_di" bpmnElement="SequenceFlow_1ss02ik">
+ <di:waypoint xsi:type="dc:Point" x="384" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="480" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420.94444444444446" y="-148" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hp2h5t_di" bpmnElement="SequenceFlow_1hp2h5t">
+ <di:waypoint xsi:type="dc:Point" x="241" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h4378g_di" bpmnElement="SequenceFlow_0h4378g">
+ <di:waypoint xsi:type="dc:Point" x="359" y="-102" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="-28" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="365" y="-67.27272727272728" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rwaeun_di" bpmnElement="SequenceFlow_1rwaeun">
+ <di:waypoint xsi:type="dc:Point" x="-152" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="-53" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-147.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14dav1d_di" bpmnElement="ScriptTask_14dav1d">
+ <dc:Bounds x="-53" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rq2jb1_di" bpmnElement="SequenceFlow_0rq2jb1">
+ <di:waypoint xsi:type="dc:Point" x="47" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="141" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="49" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0slgrxw_di" bpmnElement="IntermediateCatchEvent_0slgrxw">
+ <dc:Bounds x="-188" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-203" y="147" width="79" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gu13by_di" bpmnElement="SequenceFlow_1gu13by">
+ <di:waypoint xsi:type="dc:Point" x="-152" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="91" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-75.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0pyrfca_di" bpmnElement="CallActivity_0pyrfca">
+ <dc:Bounds x="662" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pkp4ce_di" bpmnElement="SequenceFlow_0pkp4ce">
+ <di:waypoint xsi:type="dc:Point" x="762" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="849" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="760.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0ymfq61_di" bpmnElement="EndEvent_0ymfq61">
+ <dc:Bounds x="341" y="-251" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="359" y="-211" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_076ma0v_di" bpmnElement="SequenceFlow_076ma0v">
+ <di:waypoint xsi:type="dc:Point" x="359" y="-152" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="-215" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="-189.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_02rli65_di" bpmnElement="ScriptTask_02rli65">
+ <dc:Bounds x="480" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pg3072_di" bpmnElement="SequenceFlow_0pg3072">
+ <di:waypoint xsi:type="dc:Point" x="580" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="662" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="621" y="-148" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u1piih_di" bpmnElement="ScriptTask_0u1piih">
+ <dc:Bounds x="849" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ylvnxq_di" bpmnElement="SequenceFlow_1ylvnxq">
+ <di:waypoint xsi:type="dc:Point" x="949" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="987.5" y="-148" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
index 3d08fdb1d4..50e65dcaad 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
<bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -15,7 +15,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" />
+ <bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1" camunda:errorMessageVariable="gUnknownError" />
</bpmn2:startEvent>
<bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
<bpmn2:endEvent id="EndEvent_1">
@@ -197,35 +197,35 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_28" bpmnElement="unexpectedErrors_SubProcess" isExpanded="true">
- <dc:Bounds x="300" y="880" width="394" height="188" />
+ <dc:Bounds x="187" y="926" width="394" height="188" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_71" bpmnElement="StartEvent_1">
- <dc:Bounds x="333" y="957" width="36" height="36" />
+ <dc:Bounds x="220" y="1003" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="351" y="998" width="0" height="0" />
+ <dc:Bounds x="193" y="1044" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_270" bpmnElement="ScriptTask_1">
- <dc:Bounds x="448" y="935" width="100" height="80" />
+ <dc:Bounds x="335" y="981" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_220" bpmnElement="EndEvent_1">
- <dc:Bounds x="609" y="957" width="36" height="36" />
+ <dc:Bounds x="496" y="1003" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="627" y="998" width="0" height="0" />
+ <dc:Bounds x="469" y="1044" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
- <di:waypoint xsi:type="dc:Point" x="369" y="975" />
- <di:waypoint xsi:type="dc:Point" x="448" y="975" />
+ <di:waypoint xsi:type="dc:Point" x="256" y="1021" />
+ <di:waypoint xsi:type="dc:Point" x="335" y="1021" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="411" y="975" width="0" height="0" />
+ <dc:Bounds x="253" y="1021" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
- <di:waypoint xsi:type="dc:Point" x="548" y="975" />
- <di:waypoint xsi:type="dc:Point" x="609" y="975" />
+ <di:waypoint xsi:type="dc:Point" x="435" y="1021" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="1021" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="583" y="975" width="0" height="0" />
+ <dc:Bounds x="425" y="1021" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="doCreateServiceInstance_CallActivity">
@@ -449,4 +449,4 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
index 116a8a6fb6..4b6f8d9b26 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
@@ -1,41 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
<bpmn:process id="Delete3rdONAPE2EServiceInstance" name="Delete3rdONAPE2EServiceInstance" isExecutable="true">
- <bpmn:startEvent id="StartEvent_01a6g9a" name="Delete3rdONAPRES_Start">
- <bpmn:outgoing>SequenceFlow_0ecyqjf</bpmn:outgoing>
+ <bpmn:startEvent id="StartEvent_0hj12gh" name="Delete3rdONAPRES_Start">
+ <bpmn:outgoing>SequenceFlow_190fewc</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:scriptTask id="ScriptTask_0viqs1u" name="prepare 3rdONAP Delete Request" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1sql6c3</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1soxbjk</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_0rs5t7w" name="prepare 3rdONAP Delete Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1suwdgi</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15mvx68</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.prepareSDNCRequest(execution)]]></bpmn:script>
+dcsi.prepare3rdONAPRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:endEvent id="EndEvent_1993lyd" name="Delete3rdONAPRES_End">
- <bpmn:incoming>SequenceFlow_170nvzi</bpmn:incoming>
+ <bpmn:endEvent id="EndEvent_013449q" name="Delete3rdONAPRES_End">
+ <bpmn:incoming>SequenceFlow_0a8k9xi</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_093lzuq" name="Save SPPartner In AAI">
- <bpmn:incoming>SequenceFlow_1tlym3z</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0z0u7x1</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_1b88nnk" name="Delete SPPartner In AAI">
+ <bpmn:incoming>SequenceFlow_0y2g8mr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0znwu8z</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.saveSPPartnerInAAI(execution)]]></bpmn:script>
+dcsi.deleteSPPartnerInAAI(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_02oc89f" name="Pre Process Request" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_114wjuf</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1sql6c3</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_16rcjl3" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ttrqml</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0brxjic</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
dcsi.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_1e4pgbj" name="Delete progress update parameters before delete" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1soxbjk</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_000q9m3</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_10n1tb6" name="Init Delete resource progress" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0brxjic</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ezt5f0</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "5")
+execution.setVariable("status", "processing")
+execution.setVariable("statusDescription", "Start Creating")
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)]]></bpmn:script>
+dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:serviceTask id="ServiceTask_0r6g690" name="update progress update">
+ <bpmn:serviceTask id="ServiceTask_039ju3f" name="resource progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -54,24 +57,24 @@ dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)]]></bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_000q9m3</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1lhdwv6</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_0ezt5f0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1suwdgi</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:scriptTask id="ScriptTask_1e5o8dz" name="Post process" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0z0u7x1</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1bo3fu4</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_1aj6okk" name="Post process" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0znwu8z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_04hwfll</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new Delete3rdONAPE2EServiceInstance()
csi.postProcess(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0ombt1l" name="Delete E2ESI in 3rdONAP" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0t0jlzs</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_06fak6j</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_0r2cxvb" name="Delete E2ESI in 3rdONAP" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_15mvx68</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0wp73cw</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:serviceTask id="ServiceTask_0lgqtdm" name="update progress update">
+ <bpmn:serviceTask id="ServiceTask_0p5029r" name="resource progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -90,99 +93,98 @@ dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0lpbqkc</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1tlym3z</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_0fkfn70</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1luhljs</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:scriptTask id="ScriptTask_0blh9n0" name="Allocate connection resources for cross ONAP" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1lhdwv6</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0t0jlzs</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.postActivateSDNC(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_1vlm2lw" name="Check SPPartner Info" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0ecyqjf</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1jgurvk</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_190fewc" sourceRef="StartEvent_0hj12gh" targetRef="ScriptTask_160sboy" />
+ <bpmn:sequenceFlow id="SequenceFlow_0brxjic" sourceRef="ScriptTask_16rcjl3" targetRef="ScriptTask_10n1tb6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0znwu8z" sourceRef="ScriptTask_1b88nnk" targetRef="ScriptTask_1aj6okk" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ezt5f0" sourceRef="ScriptTask_10n1tb6" targetRef="ServiceTask_039ju3f" />
+ <bpmn:scriptTask id="ScriptTask_160sboy" name="Check SPPartner Info from AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_190fewc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1f71u71</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.checkSPPartnerand LocallCall(execution)]]></bpmn:script>
+dcsi.checkSPPartnerInfoFromAAI(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_0d7a4pw" name="Is 3rdONAP Existing" default="SequenceFlow_0u3tca8">
- <bpmn:incoming>SequenceFlow_1jgurvk</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0u3tca8</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_11pvz8i</bpmn:outgoing>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_01c0nhq" name="Is 3rdONAP SPPartner Existing" default="SequenceFlow_0h1rnsw">
+ <bpmn:incoming>SequenceFlow_1f71u71</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0h1rnsw</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1msw3xo</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_14mk5it" name="Start3rdONAPDeleteE2ESI">
- <bpmn:outgoing>SequenceFlow_114wjuf</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_0h1rnsw" name="no" sourceRef="ExclusiveGateway_01c0nhq" targetRef="IntermediateThrowEvent_1y4vypx" />
+ <bpmn:sequenceFlow id="SequenceFlow_1msw3xo" name="yes" sourceRef="ExclusiveGateway_01c0nhq" targetRef="ScriptTask_1y8kdt3">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("Is3rdONAPExist" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0cql41g" name="Start3rdONAPDeleteE2ESI">
+ <bpmn:outgoing>SequenceFlow_1ttrqml</bpmn:outgoing>
<bpmn:linkEventDefinition name="Start3rdONAPDeleteE2ESI" />
</bpmn:intermediateCatchEvent>
- <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0bqnalt" name="GoTo Start3rdONAPDeleteE2ESI">
- <bpmn:incoming>SequenceFlow_06avdut</bpmn:incoming>
+ <bpmn:sequenceFlow id="SequenceFlow_1f71u71" sourceRef="ScriptTask_160sboy" targetRef="ExclusiveGateway_01c0nhq" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ttrqml" sourceRef="IntermediateCatchEvent_0cql41g" targetRef="ScriptTask_16rcjl3" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0wbo4nq" name="GoTo Start3rdONAPDeleteE2ESI">
+ <bpmn:incoming>SequenceFlow_0o376do</bpmn:incoming>
<bpmn:linkEventDefinition name="Start3rdONAPDeleteE2ESI" />
</bpmn:intermediateThrowEvent>
- <bpmn:scriptTask id="ScriptTask_1trt7oc" name="post Delete E2ESI in 3rdONAP" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_06fak6j</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0cuvrsr</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.doDeleteE2ESIin3rdONAP(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_01s6c7j" name="Query E2ESI progress in 3rdONAP" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0cuvrsr</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0lpbqkc</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_0yz8d8c" name="Query E2ESI progress in 3rdONAP" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_13s0mg5</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0kkou66</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0fkfn70</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
dcsi.getE2ESIProgressin3rdONAP(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_1ri59nm" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1bo3fu4</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_170nvzi</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def csi = new Delete3rdONAPE2EServiceInstance()
-csi.sendSyncResponse(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0d7cawc" name="Check Locall Call" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_11pvz8i</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1lqmzex</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_04hwfll" sourceRef="ScriptTask_1aj6okk" targetRef="ScriptTask_18auy29" />
+ <bpmn:scriptTask id="ScriptTask_1y8kdt3" name="Check Locall Call" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1msw3xo</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1kcu53z</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.checkSPPartnerand LocallCall(execution)]]></bpmn:script>
+dcsi.checkLocallCall(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_0j2ccax" name="Is Called from Local">
- <bpmn:incoming>SequenceFlow_1lqmzex</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_06avdut</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_1pwflny</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_1kcu53z" sourceRef="ScriptTask_1y8kdt3" targetRef="ExclusiveGateway_0pj14lp" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0pj14lp" name="Is Called from Local">
+ <bpmn:incoming>SequenceFlow_1kcu53z</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0o376do</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1y8xkzy</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0bmqdpg" name="GoTo StartLocalONAPDeleteE2ESI">
- <bpmn:incoming>SequenceFlow_0u3tca8</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_1pwflny</bpmn:incoming>
+ <bpmn:sequenceFlow id="SequenceFlow_0o376do" name="yes" sourceRef="ExclusiveGateway_0pj14lp" targetRef="IntermediateThrowEvent_0wbo4nq">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("IsLocalCall" ) == "true" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1y8xkzy" name="no" sourceRef="ExclusiveGateway_0pj14lp" targetRef="IntermediateThrowEvent_1y4vypx" />
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1y4vypx" name="GoTo StartLocalONAPDeleteE2ESI">
+ <bpmn:incoming>SequenceFlow_1y8xkzy</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0h1rnsw</bpmn:incoming>
<bpmn:linkEventDefinition name="StartLocalONAPDeleteE2ESI" />
</bpmn:intermediateThrowEvent>
- <bpmn:endEvent id="EndEvent_1itzq8n" name="Delete3rdONAPRES_End">
- <bpmn:incoming>SequenceFlow_0vhbw8y</bpmn:incoming>
+ <bpmn:endEvent id="EndEvent_0o0n3fa" name="Delete3rdONAPRES_End">
+ <bpmn:incoming>SequenceFlow_131f1jj</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_1aigzk8" name="Delete SPPartner In AAI">
- <bpmn:incoming>SequenceFlow_03mc2qq</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_03ngo7h</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_1lazb8l" name="Delete SPPartner In AAI">
+ <bpmn:incoming>SequenceFlow_1wq9f5k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18gb81f</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
dcsi.deleteSPPartnerInAAI(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_0cpsjwl" name="Pre Process Request" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1x1sk3t</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_02l74nc</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_0buj724" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0wnyy50</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0z9axn6</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new Delete3rdONAPE2EServiceInstance()
dcsi.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_01cer09" name="Delete progress update parameters before delete" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_02l74nc</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ff0jf2</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_0rixvgj" name="Prepare Delete resource progress" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0z9axn6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_04l4to1</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "100")
+execution.setVariable("status", "finished")
+execution.setVariable("statusDescription", "Local Creation Only")
def dcsi = new Delete3rdONAPE2EServiceInstance()
-dcsi.prepareUpdate(execution)]]></bpmn:script>
+dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:serviceTask id="ServiceTask_1go9g1i" name="update progress update">
+ <bpmn:serviceTask id="ServiceTask_1kgvq5e" name="update progress update">
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
@@ -201,411 +203,519 @@ dcsi.prepareUpdate(execution)]]></bpmn:script>
<camunda:connectorId>http-connector</camunda:connectorId>
</camunda:connector>
</bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_03ngo7h</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_177yb27</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1784pcx</bpmn:outgoing>
+ <bpmn:incoming>SequenceFlow_18gb81f</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1swgag2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0dkbe3r</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:scriptTask id="ScriptTask_0ywn2ec" name="Post process" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1784pcx</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1xhcwoo</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_17s3yrn" name="Post process" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0dkbe3r</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wn6y9u</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new Delete3rdONAPE2EServiceInstance()
csi.postProcess(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0ui7e2m" name="StartLocalONAPDeleteE2ESI">
- <bpmn:outgoing>SequenceFlow_1x1sk3t</bpmn:outgoing>
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_18h4prx" name="StartLocalONAPDeleteE2ESI">
+ <bpmn:outgoing>SequenceFlow_0wnyy50</bpmn:outgoing>
<bpmn:linkEventDefinition name="StartLocalONAPDeleteE2ESI" />
</bpmn:intermediateCatchEvent>
- <bpmn:scriptTask id="ScriptTask_0y6ox5c" name="Send Sync Ack Response" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1xhcwoo</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0vhbw8y</bpmn:outgoing>
+ <bpmn:scriptTask id="ScriptTask_03gddkg" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1wn6y9u</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_131f1jj</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new Delete3rdONAPE2EServiceInstance()
csi.sendSyncResponse(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_02l57i8" name="Is 3rdONAP Existing" default="SequenceFlow_177yb27">
- <bpmn:incoming>SequenceFlow_0ff0jf2</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_03mc2qq</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_177yb27</bpmn:outgoing>
+ <bpmn:sequenceFlow id="SequenceFlow_0z9axn6" sourceRef="ScriptTask_0buj724" targetRef="ScriptTask_0rixvgj" />
+ <bpmn:sequenceFlow id="SequenceFlow_131f1jj" sourceRef="ScriptTask_03gddkg" targetRef="EndEvent_0o0n3fa" />
+ <bpmn:sequenceFlow id="SequenceFlow_18gb81f" sourceRef="ScriptTask_1lazb8l" targetRef="ServiceTask_1kgvq5e" />
+ <bpmn:sequenceFlow id="SequenceFlow_0wnyy50" sourceRef="IntermediateCatchEvent_18h4prx" targetRef="ScriptTask_0buj724" />
+ <bpmn:sequenceFlow id="SequenceFlow_04l4to1" sourceRef="ScriptTask_0rixvgj" targetRef="ExclusiveGateway_1cz6dwq" />
+ <bpmn:sequenceFlow id="SequenceFlow_1wn6y9u" sourceRef="ScriptTask_17s3yrn" targetRef="ScriptTask_03gddkg" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1cz6dwq" name="Is 3rdONAP SPPartner Existing" default="SequenceFlow_1swgag2">
+ <bpmn:incoming>SequenceFlow_04l4to1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1wq9f5k</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_1swgag2</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0ecyqjf" sourceRef="StartEvent_01a6g9a" targetRef="ScriptTask_1vlm2lw" />
- <bpmn:sequenceFlow id="SequenceFlow_1sql6c3" sourceRef="ScriptTask_02oc89f" targetRef="ScriptTask_0viqs1u" />
- <bpmn:sequenceFlow id="SequenceFlow_1soxbjk" sourceRef="ScriptTask_0viqs1u" targetRef="ScriptTask_1e4pgbj" />
- <bpmn:sequenceFlow id="SequenceFlow_170nvzi" sourceRef="ScriptTask_1ri59nm" targetRef="EndEvent_1993lyd" />
- <bpmn:sequenceFlow id="SequenceFlow_1tlym3z" sourceRef="ServiceTask_0lgqtdm" targetRef="ScriptTask_093lzuq" />
- <bpmn:sequenceFlow id="SequenceFlow_0z0u7x1" sourceRef="ScriptTask_093lzuq" targetRef="ScriptTask_1e5o8dz" />
- <bpmn:sequenceFlow id="SequenceFlow_114wjuf" sourceRef="IntermediateCatchEvent_14mk5it" targetRef="ScriptTask_02oc89f" />
- <bpmn:sequenceFlow id="SequenceFlow_000q9m3" sourceRef="ScriptTask_1e4pgbj" targetRef="ServiceTask_0r6g690" />
- <bpmn:sequenceFlow id="SequenceFlow_1lhdwv6" sourceRef="ServiceTask_0r6g690" targetRef="ScriptTask_0blh9n0" />
- <bpmn:sequenceFlow id="SequenceFlow_1bo3fu4" sourceRef="ScriptTask_1e5o8dz" targetRef="ScriptTask_1ri59nm" />
- <bpmn:sequenceFlow id="SequenceFlow_0t0jlzs" sourceRef="ScriptTask_0blh9n0" targetRef="ScriptTask_0ombt1l" />
- <bpmn:sequenceFlow id="SequenceFlow_06fak6j" sourceRef="ScriptTask_0ombt1l" targetRef="ScriptTask_1trt7oc" />
- <bpmn:sequenceFlow id="SequenceFlow_0lpbqkc" sourceRef="ScriptTask_01s6c7j" targetRef="ServiceTask_0lgqtdm" />
- <bpmn:sequenceFlow id="SequenceFlow_1jgurvk" sourceRef="ScriptTask_1vlm2lw" targetRef="ExclusiveGateway_0d7a4pw" />
- <bpmn:sequenceFlow id="SequenceFlow_0u3tca8" name="no" sourceRef="ExclusiveGateway_0d7a4pw" targetRef="IntermediateThrowEvent_0bmqdpg" />
- <bpmn:sequenceFlow id="SequenceFlow_11pvz8i" name="yes" sourceRef="ExclusiveGateway_0d7a4pw" targetRef="ScriptTask_0d7cawc">
+ <bpmn:sequenceFlow id="SequenceFlow_0dkbe3r" sourceRef="ServiceTask_1kgvq5e" targetRef="ScriptTask_17s3yrn" />
+ <bpmn:sequenceFlow id="SequenceFlow_1wq9f5k" name="yes" sourceRef="ExclusiveGateway_1cz6dwq" targetRef="ScriptTask_1lazb8l">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("Is3rdONAPExist" ) == "true" )}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_06avdut" name="yes" sourceRef="ExclusiveGateway_0j2ccax" targetRef="IntermediateThrowEvent_0bqnalt">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("IsLocalCall" ) == "true" )}]]></bpmn:conditionExpression>
+ <bpmn:sequenceFlow id="SequenceFlow_1swgag2" name="No" sourceRef="ExclusiveGateway_1cz6dwq" targetRef="ServiceTask_1kgvq5e" />
+ <bpmn:scriptTask id="ScriptTask_1pdhttw" name="timeDelay" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1udji9x</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0kkou66</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new Delete3rdONAPE2EServiceInstance()
+dcsi.timeDelay(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1662gjm" name="Delete SI in 3rdONAP Success?" default="SequenceFlow_12seu6n">
+ <bpmn:incoming>SequenceFlow_0wp73cw</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_13s0mg5</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_12seu6n</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1we7izu" name="Delete SI in 3rdONAP Finished?">
+ <bpmn:incoming>SequenceFlow_1luhljs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1udji9x</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0y2g8mr</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:scriptTask id="ScriptTask_18auy29" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_04hwfll</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0a8k9xi</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new Delete3rdONAPE2EServiceInstance()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0a8k9xi" sourceRef="ScriptTask_18auy29" targetRef="EndEvent_013449q" />
+ <bpmn:sequenceFlow id="SequenceFlow_15mvx68" sourceRef="ScriptTask_0rs5t7w" targetRef="ScriptTask_0r2cxvb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0wp73cw" sourceRef="ScriptTask_0r2cxvb" targetRef="ExclusiveGateway_1662gjm" />
+ <bpmn:sequenceFlow id="SequenceFlow_13s0mg5" name="yes" sourceRef="ExclusiveGateway_1662gjm" targetRef="ScriptTask_0yz8d8c">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("serviceOrderId" ) != null && execution.getVariable("serviceOrderId" ) != "" )}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_0cuvrsr" sourceRef="ScriptTask_1trt7oc" targetRef="ScriptTask_01s6c7j" />
- <bpmn:sequenceFlow id="SequenceFlow_1lqmzex" sourceRef="ScriptTask_0d7cawc" targetRef="ExclusiveGateway_0j2ccax" />
- <bpmn:sequenceFlow id="SequenceFlow_1pwflny" name="no" sourceRef="ExclusiveGateway_0j2ccax" targetRef="IntermediateThrowEvent_0bmqdpg" />
- <bpmn:sequenceFlow id="SequenceFlow_0vhbw8y" sourceRef="ScriptTask_0y6ox5c" targetRef="EndEvent_1itzq8n" />
- <bpmn:sequenceFlow id="SequenceFlow_03mc2qq" name="yes" sourceRef="ExclusiveGateway_02l57i8" targetRef="ScriptTask_1aigzk8">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("Is3rdONAPExist" ) == "true" )}]]></bpmn:conditionExpression>
+ <bpmn:sequenceFlow id="SequenceFlow_0fkfn70" sourceRef="ScriptTask_0yz8d8c" targetRef="ServiceTask_0p5029r" />
+ <bpmn:sequenceFlow id="SequenceFlow_1suwdgi" sourceRef="ServiceTask_039ju3f" targetRef="ScriptTask_0rs5t7w" />
+ <bpmn:sequenceFlow id="SequenceFlow_0kkou66" sourceRef="ScriptTask_1pdhttw" targetRef="ScriptTask_0yz8d8c" />
+ <bpmn:sequenceFlow id="SequenceFlow_1luhljs" sourceRef="ServiceTask_0p5029r" targetRef="ExclusiveGateway_1we7izu" />
+ <bpmn:sequenceFlow id="SequenceFlow_1udji9x" name="no" sourceRef="ExclusiveGateway_1we7izu" targetRef="ScriptTask_1pdhttw">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[ #{(execution.getVariable("status" ) == "processing" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:endEvent id="EndEvent_19joonf">
+ <bpmn:incoming>SequenceFlow_1mei7hu</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_12seu6n" name="no" sourceRef="ExclusiveGateway_1662gjm" targetRef="ScriptTask_07cq0pw" />
+ <bpmn:sequenceFlow id="SequenceFlow_0y2g8mr" name="yes" sourceRef="ExclusiveGateway_1we7izu" targetRef="ScriptTask_1b88nnk">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[ #{(execution.getVariable("status" ) != "processing" )}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_03ngo7h" sourceRef="ScriptTask_1aigzk8" targetRef="ServiceTask_1go9g1i" />
- <bpmn:sequenceFlow id="SequenceFlow_1x1sk3t" sourceRef="IntermediateCatchEvent_0ui7e2m" targetRef="ScriptTask_0cpsjwl" />
- <bpmn:sequenceFlow id="SequenceFlow_02l74nc" sourceRef="ScriptTask_0cpsjwl" targetRef="ScriptTask_01cer09" />
- <bpmn:sequenceFlow id="SequenceFlow_0ff0jf2" sourceRef="ScriptTask_01cer09" targetRef="ExclusiveGateway_02l57i8" />
- <bpmn:sequenceFlow id="SequenceFlow_177yb27" name="No" sourceRef="ExclusiveGateway_02l57i8" targetRef="ServiceTask_1go9g1i" />
- <bpmn:sequenceFlow id="SequenceFlow_1784pcx" sourceRef="ServiceTask_1go9g1i" targetRef="ScriptTask_0ywn2ec" />
- <bpmn:sequenceFlow id="SequenceFlow_1xhcwoo" sourceRef="ScriptTask_0ywn2ec" targetRef="ScriptTask_0y6ox5c" />
+ <bpmn:scriptTask id="ScriptTask_07cq0pw" name="update resource progress failed" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_12seu6n</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0i9iiuo</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+execution.setVariable("progress", "100")
+execution.setVariable("status", "error")
+execution.setVariable("statusDescription", "Delete Service Order failed ")
+def dcsi = new Delete3rdONAPE2EServiceInstance()
+dcsi.prepareUpdateProgress(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_1ixmamy" name="resource progress update">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0i9iiuo</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1mei7hu</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0i9iiuo" sourceRef="ScriptTask_07cq0pw" targetRef="ServiceTask_1ixmamy" />
+ <bpmn:sequenceFlow id="SequenceFlow_1mei7hu" sourceRef="ServiceTask_1ixmamy" targetRef="EndEvent_19joonf" />
</bpmn:process>
<bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Delete3rdONAPE2EServiceInstance">
- <bpmndi:BPMNShape id="StartEvent_01a6g9a_di" bpmnElement="StartEvent_01a6g9a">
- <dc:Bounds x="870" y="-707" width="36" height="36" />
+ <bpmndi:BPMNShape id="StartEvent_0hj12gh_di" bpmnElement="StartEvent_0hj12gh">
+ <dc:Bounds x="-9" y="-418" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="849" y="-671" width="84" height="28" />
+ <dc:Bounds x="-30" y="-382" width="84" height="28" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0viqs1u_di" bpmnElement="ScriptTask_0viqs1u">
- <dc:Bounds x="1245" y="-442" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0rs5t7w_di" bpmnElement="ScriptTask_0rs5t7w">
+ <dc:Bounds x="-41" y="12" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_1993lyd_di" bpmnElement="EndEvent_1993lyd">
- <dc:Bounds x="1848" y="-46" width="36" height="36" />
+ <bpmndi:BPMNShape id="EndEvent_013449q_di" bpmnElement="EndEvent_013449q">
+ <dc:Bounds x="799" y="393" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1812" y="-4" width="84" height="28" />
+ <dc:Bounds x="763" y="435" width="84" height="28" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_093lzuq_di" bpmnElement="ScriptTask_093lzuq">
- <dc:Bounds x="1245" y="-68" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_02oc89f_di" bpmnElement="ScriptTask_02oc89f">
- <dc:Bounds x="1042" y="-442" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1e4pgbj_di" bpmnElement="ScriptTask_1e4pgbj">
- <dc:Bounds x="1442" y="-442" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_1b88nnk_di" bpmnElement="ScriptTask_1b88nnk">
+ <dc:Bounds x="-41" y="371" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0r6g690_di" bpmnElement="ServiceTask_0r6g690">
- <dc:Bounds x="1678" y="-442" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_16rcjl3_di" bpmnElement="ScriptTask_16rcjl3">
+ <dc:Bounds x="163" y="-153" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1e5o8dz_di" bpmnElement="ScriptTask_1e5o8dz">
- <dc:Bounds x="1442" y="-68" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_10n1tb6_di" bpmnElement="ScriptTask_10n1tb6">
+ <dc:Bounds x="366" y="-153" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0ombt1l_di" bpmnElement="ScriptTask_0ombt1l">
- <dc:Bounds x="1245" y="-271" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_039ju3f_di" bpmnElement="ServiceTask_039ju3f">
+ <dc:Bounds x="573" y="-153" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0lgqtdm_di" bpmnElement="ServiceTask_0lgqtdm">
- <dc:Bounds x="1042" y="-68" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_1aj6okk_di" bpmnElement="ScriptTask_1aj6okk">
+ <dc:Bounds x="231" y="371" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0blh9n0_di" bpmnElement="ScriptTask_0blh9n0">
- <dc:Bounds x="1042" y="-271" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0r2cxvb_di" bpmnElement="ScriptTask_0r2cxvb">
+ <dc:Bounds x="163" y="12" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1vlm2lw_di" bpmnElement="ScriptTask_1vlm2lw">
- <dc:Bounds x="1042" y="-729" width="100" height="80" />
+ <bpmndi:BPMNShape id="ServiceTask_0p5029r_di" bpmnElement="ServiceTask_0p5029r">
+ <dc:Bounds x="798" y="12" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_0d7a4pw_di" bpmnElement="ExclusiveGateway_0d7a4pw" isMarkerVisible="true">
- <dc:Bounds x="1259" y="-715" width="50" height="50" />
+ <bpmndi:BPMNEdge id="SequenceFlow_190fewc_di" bpmnElement="SequenceFlow_190fewc">
+ <di:waypoint xsi:type="dc:Point" x="27" y="-400" />
+ <di:waypoint xsi:type="dc:Point" x="163" y="-400" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1243" y="-747" width="56" height="28" />
+ <dc:Bounds x="95" y="-422" width="0" height="14" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="IntermediateCatchEvent_14mk5it_di" bpmnElement="IntermediateCatchEvent_14mk5it">
- <dc:Bounds x="870" y="-420" width="36" height="36" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0brxjic_di" bpmnElement="SequenceFlow_0brxjic">
+ <di:waypoint xsi:type="dc:Point" x="263" y="-113" />
+ <di:waypoint xsi:type="dc:Point" x="366" y="-113" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="850" y="-384" width="85" height="28" />
+ <dc:Bounds x="269.5" y="-135" width="90" height="14" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="IntermediateThrowEvent_0bqnalt_di" bpmnElement="IntermediateThrowEvent_0bqnalt">
- <dc:Bounds x="1835" y="-707" width="36" height="36" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0znwu8z_di" bpmnElement="SequenceFlow_0znwu8z">
+ <di:waypoint xsi:type="dc:Point" x="59" y="411" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="411" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1813" y="-666" width="85" height="42" />
+ <dc:Bounds x="100" y="389" width="90" height="14" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1trt7oc_di" bpmnElement="ScriptTask_1trt7oc">
- <dc:Bounds x="1442" y="-271" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_01s6c7j_di" bpmnElement="ScriptTask_01s6c7j">
- <dc:Bounds x="1678" y="-271" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1ri59nm_di" bpmnElement="ScriptTask_1ri59nm">
- <dc:Bounds x="1678" y="-68" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0d7cawc_di" bpmnElement="ScriptTask_0d7cawc">
- <dc:Bounds x="1442" y="-729" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_0j2ccax_di" bpmnElement="ExclusiveGateway_0j2ccax" isMarkerVisible="true">
- <dc:Bounds x="1671" y="-715" width="50" height="50" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ezt5f0_di" bpmnElement="SequenceFlow_0ezt5f0">
+ <di:waypoint xsi:type="dc:Point" x="466" y="-113" />
+ <di:waypoint xsi:type="dc:Point" x="573" y="-113" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1655" y="-747" width="65" height="28" />
+ <dc:Bounds x="474.5" y="-135" width="90" height="14" />
</bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_160sboy_di" bpmnElement="ScriptTask_160sboy">
+ <dc:Bounds x="163" y="-440" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="IntermediateThrowEvent_0bmqdpg_di" bpmnElement="IntermediateThrowEvent_0bmqdpg">
- <dc:Bounds x="1678" y="-589" width="36" height="36" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_01c0nhq_di" bpmnElement="ExclusiveGateway_01c0nhq" isMarkerVisible="true">
+ <dc:Bounds x="380" y="-426" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1656" y="-548" width="85" height="42" />
+ <dc:Bounds x="378" y="-458" width="56" height="28" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_1itzq8n_di" bpmnElement="EndEvent_1itzq8n">
- <dc:Bounds x="1848" y="288" width="36" height="36" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0h1rnsw_di" bpmnElement="SequenceFlow_0h1rnsw">
+ <di:waypoint xsi:type="dc:Point" x="405" y="-376" />
+ <di:waypoint xsi:type="dc:Point" x="405" y="-282" />
+ <di:waypoint xsi:type="dc:Point" x="525" y="-282" />
+ <di:waypoint xsi:type="dc:Point" x="525" y="-282" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="-282" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1812" y="330" width="84" height="28" />
+ <dc:Bounds x="389" y="-368.53991291727147" width="12" height="14" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1aigzk8_di" bpmnElement="ScriptTask_1aigzk8">
- <dc:Bounds x="1665" y="67" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0cpsjwl_di" bpmnElement="ScriptTask_0cpsjwl">
- <dc:Bounds x="1042" y="67" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_01cer09_di" bpmnElement="ScriptTask_01cer09">
- <dc:Bounds x="1245" y="67" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1go9g1i_di" bpmnElement="ServiceTask_1go9g1i">
- <dc:Bounds x="1042" y="266" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0ywn2ec_di" bpmnElement="ScriptTask_0ywn2ec">
- <dc:Bounds x="1245" y="266" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="IntermediateCatchEvent_0ui7e2m_di" bpmnElement="IntermediateCatchEvent_0ui7e2m">
- <dc:Bounds x="870" y="89" width="36" height="36" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1msw3xo_di" bpmnElement="SequenceFlow_1msw3xo">
+ <di:waypoint xsi:type="dc:Point" x="430" y="-401" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="-400" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="850" y="125" width="85" height="28" />
+ <dc:Bounds x="499.95320010152244" y="-422.3646305622811" width="18" height="14" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0y6ox5c_di" bpmnElement="ScriptTask_0y6ox5c">
- <dc:Bounds x="1442" y="266" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_02l57i8_di" bpmnElement="ExclusiveGateway_02l57i8" isMarkerVisible="true">
- <dc:Bounds x="1467" y="82" width="50" height="50" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0cql41g_di" bpmnElement="IntermediateCatchEvent_0cql41g">
+ <dc:Bounds x="-9" y="-131" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1461" y="50" width="56" height="28" />
+ <dc:Bounds x="-29" y="-95" width="85" height="28" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ecyqjf_di" bpmnElement="SequenceFlow_0ecyqjf">
- <di:waypoint xsi:type="dc:Point" x="906" y="-689" />
- <di:waypoint xsi:type="dc:Point" x="1042" y="-689" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1f71u71_di" bpmnElement="SequenceFlow_1f71u71">
+ <di:waypoint xsi:type="dc:Point" x="263" y="-400" />
+ <di:waypoint xsi:type="dc:Point" x="380" y="-401" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="929" y="-711" width="0" height="14" />
+ <dc:Bounds x="321.5" y="-422.5" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1sql6c3_di" bpmnElement="SequenceFlow_1sql6c3">
- <di:waypoint xsi:type="dc:Point" x="1142" y="-402" />
- <di:waypoint xsi:type="dc:Point" x="1245" y="-402" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1ttrqml_di" bpmnElement="SequenceFlow_1ttrqml">
+ <di:waypoint xsi:type="dc:Point" x="27" y="-113" />
+ <di:waypoint xsi:type="dc:Point" x="163" y="-113" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1149.5" y="-424" width="0" height="14" />
+ <dc:Bounds x="50" y="-135" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1soxbjk_di" bpmnElement="SequenceFlow_1soxbjk">
- <di:waypoint xsi:type="dc:Point" x="1345" y="-402" />
- <di:waypoint xsi:type="dc:Point" x="1442" y="-402" />
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0wbo4nq_di" bpmnElement="IntermediateThrowEvent_0wbo4nq">
+ <dc:Bounds x="1026" y="-418" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1349.5" y="-424" width="0" height="14" />
+ <dc:Bounds x="1004" y="-377" width="85" height="42" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_170nvzi_di" bpmnElement="SequenceFlow_170nvzi">
- <di:waypoint xsi:type="dc:Point" x="1778" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1848" y="-28" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0yz8d8c_di" bpmnElement="ScriptTask_0yz8d8c">
+ <dc:Bounds x="573" y="12" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_04hwfll_di" bpmnElement="SequenceFlow_04hwfll">
+ <di:waypoint xsi:type="dc:Point" x="331" y="411" />
+ <di:waypoint xsi:type="dc:Point" x="509" y="411" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1768" y="-50" width="0" height="14" />
+ <dc:Bounds x="375" y="389" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1tlym3z_di" bpmnElement="SequenceFlow_1tlym3z">
- <di:waypoint xsi:type="dc:Point" x="1142" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1194" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1194" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1245" y="-28" />
+ <bpmndi:BPMNShape id="ScriptTask_1y8kdt3_di" bpmnElement="ScriptTask_1y8kdt3">
+ <dc:Bounds x="563" y="-440" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kcu53z_di" bpmnElement="SequenceFlow_1kcu53z">
+ <di:waypoint xsi:type="dc:Point" x="663" y="-400" />
+ <di:waypoint xsi:type="dc:Point" x="792" y="-401" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1164" y="-35" width="0" height="14" />
+ <dc:Bounds x="727.5" y="-422.5" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0z0u7x1_di" bpmnElement="SequenceFlow_0z0u7x1">
- <di:waypoint xsi:type="dc:Point" x="1345" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1394" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1394" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1442" y="-28" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_0pj14lp_di" bpmnElement="ExclusiveGateway_0pj14lp" isMarkerVisible="true">
+ <dc:Bounds x="792" y="-426" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="776" y="-458" width="83" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0o376do_di" bpmnElement="SequenceFlow_0o376do">
+ <di:waypoint xsi:type="dc:Point" x="842" y="-401" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="-400" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1364" y="-35" width="0" height="14" />
+ <dc:Bounds x="924.8735220112762" y="-422.0003436810377" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_114wjuf_di" bpmnElement="SequenceFlow_114wjuf">
- <di:waypoint xsi:type="dc:Point" x="906" y="-402" />
- <di:waypoint xsi:type="dc:Point" x="1042" y="-402" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1y8xkzy_di" bpmnElement="SequenceFlow_1y8xkzy">
+ <di:waypoint xsi:type="dc:Point" x="817" y="-376" />
+ <di:waypoint xsi:type="dc:Point" x="817" y="-300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="929" y="-424" width="0" height="14" />
+ <dc:Bounds x="827" y="-357" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_000q9m3_di" bpmnElement="SequenceFlow_000q9m3">
- <di:waypoint xsi:type="dc:Point" x="1545" y="-402" />
- <di:waypoint xsi:type="dc:Point" x="1678" y="-402" />
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1y4vypx_di" bpmnElement="IntermediateThrowEvent_1y4vypx">
+ <dc:Bounds x="799" y="-300" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="777" y="-259" width="85" height="42" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0o0n3fa_di" bpmnElement="EndEvent_0o0n3fa">
+ <dc:Bounds x="794" y="733" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1567.5" y="-424" width="0" height="14" />
+ <dc:Bounds x="758" y="775" width="84" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1lazb8l_di" bpmnElement="ScriptTask_1lazb8l">
+ <dc:Bounds x="762" y="512" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0buj724_di" bpmnElement="ScriptTask_0buj724">
+ <dc:Bounds x="139" y="512" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0rixvgj_di" bpmnElement="ScriptTask_0rixvgj">
+ <dc:Bounds x="342" y="512" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1kgvq5e_di" bpmnElement="ServiceTask_1kgvq5e">
+ <dc:Bounds x="-41" y="711" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_17s3yrn_di" bpmnElement="ScriptTask_17s3yrn">
+ <dc:Bounds x="231" y="711" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_18h4prx_di" bpmnElement="IntermediateCatchEvent_18h4prx">
+ <dc:Bounds x="-9" y="534" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-29" y="570" width="85" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03gddkg_di" bpmnElement="ScriptTask_03gddkg">
+ <dc:Bounds x="496" y="711" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0z9axn6_di" bpmnElement="SequenceFlow_0z9axn6">
+ <di:waypoint xsi:type="dc:Point" x="239" y="552" />
+ <di:waypoint xsi:type="dc:Point" x="342" y="552" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="246" y="530" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1lhdwv6_di" bpmnElement="SequenceFlow_1lhdwv6">
- <di:waypoint xsi:type="dc:Point" x="1728" y="-362" />
- <di:waypoint xsi:type="dc:Point" x="1728" y="-316" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="-316" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="-271" />
+ <bpmndi:BPMNEdge id="SequenceFlow_131f1jj_di" bpmnElement="SequenceFlow_131f1jj">
+ <di:waypoint xsi:type="dc:Point" x="596" y="751" />
+ <di:waypoint xsi:type="dc:Point" x="794" y="751" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1365" y="-338" width="0" height="14" />
+ <dc:Bounds x="650" y="729" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1bo3fu4_di" bpmnElement="SequenceFlow_1bo3fu4">
- <di:waypoint xsi:type="dc:Point" x="1542" y="-28" />
- <di:waypoint xsi:type="dc:Point" x="1678" y="-28" />
+ <bpmndi:BPMNEdge id="SequenceFlow_18gb81f_di" bpmnElement="SequenceFlow_18gb81f">
+ <di:waypoint xsi:type="dc:Point" x="812" y="592" />
+ <di:waypoint xsi:type="dc:Point" x="812" y="641" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="641" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="711" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1565" y="-50" width="0" height="14" />
+ <dc:Bounds x="365.5" y="619" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0t0jlzs_di" bpmnElement="SequenceFlow_0t0jlzs">
- <di:waypoint xsi:type="dc:Point" x="1142" y="-231" />
- <di:waypoint xsi:type="dc:Point" x="1245" y="-231" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0wnyy50_di" bpmnElement="SequenceFlow_0wnyy50">
+ <di:waypoint xsi:type="dc:Point" x="27" y="552" />
+ <di:waypoint xsi:type="dc:Point" x="139" y="552" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1148.5" y="-253" width="0" height="14" />
+ <dc:Bounds x="38" y="530" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_06fak6j_di" bpmnElement="SequenceFlow_06fak6j">
- <di:waypoint xsi:type="dc:Point" x="1345" y="-231" />
- <di:waypoint xsi:type="dc:Point" x="1442" y="-231" />
+ <bpmndi:BPMNEdge id="SequenceFlow_04l4to1_di" bpmnElement="SequenceFlow_04l4to1">
+ <di:waypoint xsi:type="dc:Point" x="442" y="552" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="552" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1348.5" y="-253" width="0" height="14" />
+ <dc:Bounds x="458" y="530" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0lpbqkc_di" bpmnElement="SequenceFlow_0lpbqkc">
- <di:waypoint xsi:type="dc:Point" x="1728" y="-191" />
- <di:waypoint xsi:type="dc:Point" x="1728" y="-137" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="-137" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="-68" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1wn6y9u_di" bpmnElement="SequenceFlow_1wn6y9u">
+ <di:waypoint xsi:type="dc:Point" x="331" y="751" />
+ <di:waypoint xsi:type="dc:Point" x="496" y="751" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1365" y="-159" width="0" height="14" />
+ <dc:Bounds x="368.5" y="729" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1jgurvk_di" bpmnElement="SequenceFlow_1jgurvk">
- <di:waypoint xsi:type="dc:Point" x="1142" y="-689" />
- <di:waypoint xsi:type="dc:Point" x="1259" y="-690" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_1cz6dwq_di" bpmnElement="ExclusiveGateway_1cz6dwq" isMarkerVisible="true">
+ <dc:Bounds x="564" y="527" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="558" y="495" width="56" height="28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0dkbe3r_di" bpmnElement="SequenceFlow_0dkbe3r">
+ <di:waypoint xsi:type="dc:Point" x="59" y="751" />
+ <di:waypoint xsi:type="dc:Point" x="231" y="751" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1156.5" y="-710.5" width="0" height="14" />
+ <dc:Bounds x="100" y="729" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0u3tca8_di" bpmnElement="SequenceFlow_0u3tca8">
- <di:waypoint xsi:type="dc:Point" x="1284" y="-665" />
- <di:waypoint xsi:type="dc:Point" x="1284" y="-571" />
- <di:waypoint xsi:type="dc:Point" x="1404" y="-571" />
- <di:waypoint xsi:type="dc:Point" x="1404" y="-571" />
- <di:waypoint xsi:type="dc:Point" x="1678" y="-571" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1wq9f5k_di" bpmnElement="SequenceFlow_1wq9f5k">
+ <di:waypoint xsi:type="dc:Point" x="614" y="552" />
+ <di:waypoint xsi:type="dc:Point" x="762" y="552" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1268" y="-658" width="12" height="14" />
+ <dc:Bounds x="679" y="530" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_11pvz8i_di" bpmnElement="SequenceFlow_11pvz8i">
- <di:waypoint xsi:type="dc:Point" x="1309" y="-690" />
- <di:waypoint xsi:type="dc:Point" x="1442" y="-689" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1swgag2_di" bpmnElement="SequenceFlow_1swgag2">
+ <di:waypoint xsi:type="dc:Point" x="589" y="577" />
+ <di:waypoint xsi:type="dc:Point" x="589" y="641" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="641" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="711" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1378.5" y="-711.5" width="18" height="14" />
+ <dc:Bounds x="293.22499999999997" y="619" width="13" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_06avdut_di" bpmnElement="SequenceFlow_06avdut">
- <di:waypoint xsi:type="dc:Point" x="1721" y="-690" />
- <di:waypoint xsi:type="dc:Point" x="1835" y="-689" />
+ <bpmndi:BPMNShape id="ScriptTask_1pdhttw_di" bpmnElement="ScriptTask_1pdhttw">
+ <dc:Bounds x="573" y="187" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1662gjm_di" bpmnElement="ExclusiveGateway_1662gjm" isMarkerVisible="true">
+ <dc:Bounds x="386" y="27" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="384" y="-25" width="55" height="42" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1we7izu_di" bpmnElement="ExclusiveGateway_1we7izu" isMarkerVisible="true">
+ <dc:Bounds x="823" y="202" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="880" y="206" width="68" height="42" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_18auy29_di" bpmnElement="ScriptTask_18auy29">
+ <dc:Bounds x="509" y="371" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a8k9xi_di" bpmnElement="SequenceFlow_0a8k9xi">
+ <di:waypoint xsi:type="dc:Point" x="609" y="411" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="411" />
+ <di:waypoint xsi:type="dc:Point" x="704" y="411" />
+ <di:waypoint xsi:type="dc:Point" x="799" y="411" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1769" y="-710.5" width="18" height="14" />
+ <dc:Bounds x="674" y="404" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0cuvrsr_di" bpmnElement="SequenceFlow_0cuvrsr">
- <di:waypoint xsi:type="dc:Point" x="1542" y="-231" />
- <di:waypoint xsi:type="dc:Point" x="1678" y="-231" />
+ <bpmndi:BPMNEdge id="SequenceFlow_15mvx68_di" bpmnElement="SequenceFlow_15mvx68">
+ <di:waypoint xsi:type="dc:Point" x="59" y="52" />
+ <di:waypoint xsi:type="dc:Point" x="163" y="52" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1565" y="-253" width="0" height="14" />
+ <dc:Bounds x="66" y="30" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1lqmzex_di" bpmnElement="SequenceFlow_1lqmzex">
- <di:waypoint xsi:type="dc:Point" x="1542" y="-689" />
- <di:waypoint xsi:type="dc:Point" x="1671" y="-690" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0wp73cw_di" bpmnElement="SequenceFlow_0wp73cw">
+ <di:waypoint xsi:type="dc:Point" x="263" y="52" />
+ <di:waypoint xsi:type="dc:Point" x="386" y="52" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1606.5" y="-711.5" width="0" height="14" />
+ <dc:Bounds x="279.5" y="30" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1pwflny_di" bpmnElement="SequenceFlow_1pwflny">
- <di:waypoint xsi:type="dc:Point" x="1696" y="-665" />
- <di:waypoint xsi:type="dc:Point" x="1696" y="-589" />
+ <bpmndi:BPMNEdge id="SequenceFlow_13s0mg5_di" bpmnElement="SequenceFlow_13s0mg5">
+ <di:waypoint xsi:type="dc:Point" x="436" y="52" />
+ <di:waypoint xsi:type="dc:Point" x="573" y="52" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1706" y="-646" width="12" height="14" />
+ <dc:Bounds x="496" y="30" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0vhbw8y_di" bpmnElement="SequenceFlow_0vhbw8y">
- <di:waypoint xsi:type="dc:Point" x="1542" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1848" y="306" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0fkfn70_di" bpmnElement="SequenceFlow_0fkfn70">
+ <di:waypoint xsi:type="dc:Point" x="673" y="52" />
+ <di:waypoint xsi:type="dc:Point" x="798" y="52" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1695" y="284" width="0" height="14" />
+ <dc:Bounds x="690.5" y="30" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_03mc2qq_di" bpmnElement="SequenceFlow_03mc2qq">
- <di:waypoint xsi:type="dc:Point" x="1517" y="107" />
- <di:waypoint xsi:type="dc:Point" x="1665" y="107" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1suwdgi_di" bpmnElement="SequenceFlow_1suwdgi">
+ <di:waypoint xsi:type="dc:Point" x="673" y="-113" />
+ <di:waypoint xsi:type="dc:Point" x="848" y="-113" />
+ <di:waypoint xsi:type="dc:Point" x="848" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="12" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1582" y="85" width="18" height="14" />
+ <dc:Bounds x="818" y="-83" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_03ngo7h_di" bpmnElement="SequenceFlow_03ngo7h">
- <di:waypoint xsi:type="dc:Point" x="1715" y="147" />
- <di:waypoint xsi:type="dc:Point" x="1715" y="196" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="196" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="266" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0kkou66_di" bpmnElement="SequenceFlow_0kkou66">
+ <di:waypoint xsi:type="dc:Point" x="623" y="187" />
+ <di:waypoint xsi:type="dc:Point" x="623" y="92" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1403.5" y="174" width="0" height="14" />
+ <dc:Bounds x="593" y="132.5" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1x1sk3t_di" bpmnElement="SequenceFlow_1x1sk3t">
- <di:waypoint xsi:type="dc:Point" x="906" y="107" />
- <di:waypoint xsi:type="dc:Point" x="1042" y="107" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1luhljs_di" bpmnElement="SequenceFlow_1luhljs">
+ <di:waypoint xsi:type="dc:Point" x="848" y="92" />
+ <di:waypoint xsi:type="dc:Point" x="848" y="202" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="929" y="85" width="0" height="14" />
+ <dc:Bounds x="818" y="140" width="90" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_02l74nc_di" bpmnElement="SequenceFlow_02l74nc">
- <di:waypoint xsi:type="dc:Point" x="1142" y="107" />
- <di:waypoint xsi:type="dc:Point" x="1245" y="107" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1udji9x_di" bpmnElement="SequenceFlow_1udji9x">
+ <di:waypoint xsi:type="dc:Point" x="823" y="227" />
+ <di:waypoint xsi:type="dc:Point" x="673" y="227" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1193.5" y="85" width="0" height="14" />
+ <dc:Bounds x="746" y="208" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ff0jf2_di" bpmnElement="SequenceFlow_0ff0jf2">
- <di:waypoint xsi:type="dc:Point" x="1345" y="107" />
- <di:waypoint xsi:type="dc:Point" x="1467" y="107" />
+ <bpmndi:BPMNShape id="EndEvent_19joonf_di" bpmnElement="EndEvent_19joonf">
+ <dc:Bounds x="387" y="197" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1406" y="85" width="0" height="14" />
+ <dc:Bounds x="360" y="236" width="90" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_12seu6n_di" bpmnElement="SequenceFlow_12seu6n">
+ <di:waypoint xsi:type="dc:Point" x="411" y="77" />
+ <di:waypoint xsi:type="dc:Point" x="411" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="137" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="175" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="183.26272082138004" y="113.00000000000001" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_177yb27_di" bpmnElement="SequenceFlow_177yb27">
- <di:waypoint xsi:type="dc:Point" x="1492" y="132" />
- <di:waypoint xsi:type="dc:Point" x="1492" y="196" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="196" />
- <di:waypoint xsi:type="dc:Point" x="1092" y="266" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0y2g8mr_di" bpmnElement="SequenceFlow_0y2g8mr">
+ <di:waypoint xsi:type="dc:Point" x="848" y="252" />
+ <di:waypoint xsi:type="dc:Point" x="848" y="324" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="324" />
+ <di:waypoint xsi:type="dc:Point" x="9" y="371" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1286" y="174" width="13" height="14" />
+ <dc:Bounds x="419.8991436726927" y="302" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1784pcx_di" bpmnElement="SequenceFlow_1784pcx">
- <di:waypoint xsi:type="dc:Point" x="1142" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1176" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1241" y="306" />
+ <bpmndi:BPMNShape id="ScriptTask_07cq0pw_di" bpmnElement="ScriptTask_07cq0pw">
+ <dc:Bounds x="-41" y="175" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1ixmamy_di" bpmnElement="ServiceTask_1ixmamy">
+ <dc:Bounds x="166" y="175" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0i9iiuo_di" bpmnElement="SequenceFlow_0i9iiuo">
+ <di:waypoint xsi:type="dc:Point" x="59" y="215" />
+ <di:waypoint xsi:type="dc:Point" x="166" y="215" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1159" y="284" width="0" height="14" />
+ <dc:Bounds x="68.5" y="193" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1xhcwoo_di" bpmnElement="SequenceFlow_1xhcwoo">
- <di:waypoint xsi:type="dc:Point" x="1345" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1400" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1400" y="306" />
- <di:waypoint xsi:type="dc:Point" x="1442" y="306" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1mei7hu_di" bpmnElement="SequenceFlow_1mei7hu">
+ <di:waypoint xsi:type="dc:Point" x="266" y="215" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="215" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1415" y="299" width="0" height="14" />
+ <dc:Bounds x="326.5" y="193" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn
new file mode 100644
index 0000000000..be15908697
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteDeviceResource.bpmn
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+ <bpmn:process id="DeleteDeviceResource.bpmn" name="DeleteDeviceResource.bpmn" isExecutable="true">
+ <bpmn:endEvent id="EndEvent_1x6k78c" name="delete Dev end">
+ <bpmn:incoming>SequenceFlow_0auvfvm</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_05niqbf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0auvfvm</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteDeviceResource.bpmn()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05niqbf" sourceRef="Task_0bga3e8" targetRef="ScriptTask_1g5zyi6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0auvfvm" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
+ <bpmn:callActivity id="Task_0bga3e8" name="call Delete SDNC Network Resource" calledElement="DeleteSDNCNetworkResource">
+ <bpmn:extensionElements>
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="resourceInput" target="resourceInput" />
+ <camunda:in source="recipeParamXsd" target="recipeParamXsd" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="svcAction" target="svcAction" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="networkRequest" target="networkRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_1gu13by</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05niqbf</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:startEvent id="StartEvent_1vjxae6" name="deleteDev_StartEvent">
+ <bpmn:outgoing>SequenceFlow_1rwaeun</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1caax8u" name="GoTo StartDeleteDevinSDNC">
+ <bpmn:incoming>SequenceFlow_1ylvnxq</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartDeleteDevinSDNC" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:scriptTask id="ScriptTask_00y93jj" name="Check DevType from AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rq2jb1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1hp2h5t</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteDeviceResource()
+dcsi.checkDevType(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0kba700" name="Dev Type" default="SequenceFlow_076ma0v">
+ <bpmn:incoming>SequenceFlow_1hp2h5t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ss02ik</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0h4378g</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_076ma0v</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1chnlq6" name="GoTo StartDeleteDevinSDNC">
+ <bpmn:incoming>SequenceFlow_0h4378g</bpmn:incoming>
+ <bpmn:linkEventDefinition name="StartDeleteDevinSDNC" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1ss02ik" name="VNF" sourceRef="ExclusiveGateway_0kba700" targetRef="ScriptTask_02rli65">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("device_class" ) == "VNF" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1hp2h5t" sourceRef="ScriptTask_00y93jj" targetRef="ExclusiveGateway_0kba700" />
+ <bpmn:sequenceFlow id="SequenceFlow_0h4378g" name="PNF" sourceRef="ExclusiveGateway_0kba700" targetRef="IntermediateThrowEvent_1chnlq6">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("device_class" ) == "PNF" )}]]></bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1rwaeun" sourceRef="StartEvent_1vjxae6" targetRef="ScriptTask_14dav1d" />
+ <bpmn:scriptTask id="ScriptTask_14dav1d" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1rwaeun</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0rq2jb1</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteDeviceResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0rq2jb1" sourceRef="ScriptTask_14dav1d" targetRef="ScriptTask_00y93jj" />
+ <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0slgrxw" name="StartDeleteDevinSDNC">
+ <bpmn:outgoing>SequenceFlow_1gu13by</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="StartDeleteDevinSDNC" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1gu13by" sourceRef="IntermediateCatchEvent_0slgrxw" targetRef="Task_0bga3e8" />
+ <bpmn:callActivity id="CallActivity_0pyrfca" name="call DeleteVNF" calledElement="DoDeleteVNF">
+ <bpmn:extensionElements>
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="resourceInput" target="resourceInput" />
+ <camunda:in source="recipeParamXsd" target="recipeParamXsd" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="svcAction" target="svcAction" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="networkRequest" target="networkRequest" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0pg3072</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0pkp4ce</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_0pkp4ce" sourceRef="CallActivity_0pyrfca" targetRef="ScriptTask_0u1piih" />
+ <bpmn:endEvent id="EndEvent_0ymfq61">
+ <bpmn:incoming>SequenceFlow_076ma0v</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_076ma0v" sourceRef="ExclusiveGateway_0kba700" targetRef="EndEvent_0ymfq61" />
+ <bpmn:scriptTask id="ScriptTask_02rli65" name="Get VNF ID" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ss02ik</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0pg3072</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteDeviceResource()
+dcsi.getVNFTemplatefromSDC(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0pg3072" sourceRef="ScriptTask_02rli65" targetRef="CallActivity_0pyrfca" />
+ <bpmn:scriptTask id="ScriptTask_0u1piih" name="Post VNF info process " scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0pkp4ce</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ylvnxq</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteDeviceResource()
+dcsi.postVNFInfoProcess(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1ylvnxq" sourceRef="ScriptTask_0u1piih" targetRef="IntermediateThrowEvent_1caax8u" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteDeviceResource.bpmn">
+ <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+ <dc:Bounds x="1026" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="994" y="153" width="75" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+ <dc:Bounds x="494" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05niqbf_di" bpmnElement="SequenceFlow_05niqbf">
+ <di:waypoint xsi:type="dc:Point" x="191" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="494" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="297.5" y="104" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0auvfvm_di" bpmnElement="SequenceFlow_0auvfvm">
+ <di:waypoint xsi:type="dc:Point" x="594" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="765" y="104" width="90" height="20" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0aywvn3_di" bpmnElement="Task_0bga3e8">
+ <dc:Bounds x="91" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1vjxae6_di" bpmnElement="StartEvent_1vjxae6">
+ <dc:Bounds x="-188" y="-145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-211" y="-109" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1caax8u_di" bpmnElement="IntermediateThrowEvent_1caax8u">
+ <dc:Bounds x="1026" y="-145" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1010" y="-104" width="77" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_00y93jj_di" bpmnElement="ScriptTask_00y93jj">
+ <dc:Bounds x="141" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0kba700_di" bpmnElement="ExclusiveGateway_0kba700" isMarkerVisible="true">
+ <dc:Bounds x="334" y="-152" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="309" y="-166" width="34" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1chnlq6_di" bpmnElement="IntermediateThrowEvent_1chnlq6">
+ <dc:Bounds x="341" y="-28" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="325" y="13" width="78" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ss02ik_di" bpmnElement="SequenceFlow_1ss02ik">
+ <di:waypoint xsi:type="dc:Point" x="384" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="480" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="420.94444444444446" y="-148" width="23" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hp2h5t_di" bpmnElement="SequenceFlow_1hp2h5t">
+ <di:waypoint xsi:type="dc:Point" x="241" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="334" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="242.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h4378g_di" bpmnElement="SequenceFlow_0h4378g">
+ <di:waypoint xsi:type="dc:Point" x="359" y="-102" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="-28" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="365" y="-67.27272727272728" width="22" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rwaeun_di" bpmnElement="SequenceFlow_1rwaeun">
+ <di:waypoint xsi:type="dc:Point" x="-152" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="-53" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-147.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14dav1d_di" bpmnElement="ScriptTask_14dav1d">
+ <dc:Bounds x="-53" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rq2jb1_di" bpmnElement="SequenceFlow_0rq2jb1">
+ <di:waypoint xsi:type="dc:Point" x="47" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="141" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="49" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0slgrxw_di" bpmnElement="IntermediateCatchEvent_0slgrxw">
+ <dc:Bounds x="-188" y="111" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-203" y="147" width="78" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gu13by_di" bpmnElement="SequenceFlow_1gu13by">
+ <di:waypoint xsi:type="dc:Point" x="-152" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="91" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-75.5" y="108" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0pyrfca_di" bpmnElement="CallActivity_0pyrfca">
+ <dc:Bounds x="662" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pkp4ce_di" bpmnElement="SequenceFlow_0pkp4ce">
+ <di:waypoint xsi:type="dc:Point" x="762" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="849" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="760.5" y="-148" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_0ymfq61_di" bpmnElement="EndEvent_0ymfq61">
+ <dc:Bounds x="341" y="-251" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="359" y="-211" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_076ma0v_di" bpmnElement="SequenceFlow_076ma0v">
+ <di:waypoint xsi:type="dc:Point" x="359" y="-152" />
+ <di:waypoint xsi:type="dc:Point" x="359" y="-215" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="374" y="-189.5" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_02rli65_di" bpmnElement="ScriptTask_02rli65">
+ <dc:Bounds x="480" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pg3072_di" bpmnElement="SequenceFlow_0pg3072">
+ <di:waypoint xsi:type="dc:Point" x="580" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="662" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="621" y="-148" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0u1piih_di" bpmnElement="ScriptTask_0u1piih">
+ <dc:Bounds x="849" y="-167" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ylvnxq_di" bpmnElement="SequenceFlow_1ylvnxq">
+ <di:waypoint xsi:type="dc:Point" x="949" y="-127" />
+ <di:waypoint xsi:type="dc:Point" x="1026" y="-127" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="987.5" y="-148" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
index 781a54be80..00c0288246 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSDNCNetworkResource.bpmn
@@ -137,6 +137,15 @@ csi.sendSyncResponse(execution)</bpmn:script>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_00vqgvt" sourceRef="Task_1xychp0" targetRef="PreprocessIncomingRequest_task" />
<bpmn:callActivity id="Task_1xychp0" name="Call Deactivate SDNC Network Resource" calledElement="DeActivateSDNCNetworkResource">
+ <bpmn:extensionElements>
+ <camunda:in source="mso-request-id" target="mso-request-id" />
+ <camunda:in source="requestAction" target="requestAction" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="recipeParams" target="recipeParams" />
+ <camunda:in source="recipeParamXsd" target="recipeParamXsd" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="resourceInput" target="resourceInput" />
+ </bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0h3klf0</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_00vqgvt</bpmn:outgoing>
</bpmn:callActivity>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
index a835946d1d..0d287ebca4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
@@ -1,5 +1,5 @@
<?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.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="DeleteVcpeResCustService" name="DeleteVcpeResCustService" isExecutable="true">
<bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
@@ -138,26 +138,12 @@ DeleteVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_04ao07f</bpmn2:incoming>
<bpmn2:linkEventDefinition name="FinishProcess" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="ScriptTask_05m3m2e" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0jek18q</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1ttswdr</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_05m3m2e" name="Process Response &#38; ready data for subflows" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1ttswdr</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_18103ca</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
def DeleteVcpeResCustService = new DeleteVcpeResCustService()
-DeleteVcpeResCustService.prepareServiceDelete(execution)]]></bpmn2:script>
+DeleteVcpeResCustService.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_112zjtp" name="QueryServiceInstance">
<bpmn2:outgoing>SequenceFlow_0jek18q</bpmn2:outgoing>
@@ -167,10 +153,9 @@ DeleteVcpeResCustService.prepareServiceDelete(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_18103ca</bpmn2:incoming>
<bpmn2:linkEventDefinition name="DeleteBRG" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0jek18q" sourceRef="IntermediateCatchEvent_112zjtp" targetRef="callGetServiceInstance" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0jek18q" sourceRef="IntermediateCatchEvent_112zjtp" targetRef="ScriptTask_05m3m2e" />
<bpmn2:sequenceFlow id="SequenceFlow_18103ca" sourceRef="ScriptTask_05m3m2e" targetRef="IntermediateThrowEvent_162gs5w" />
<bpmn2:sequenceFlow id="SequenceFlow_04ao07f" sourceRef="doDeleteServiceInstance_CallActivity" targetRef="IntermediateThrowEvent_0prlju0" />
- <bpmn2:sequenceFlow id="SequenceFlow_1ttswdr" sourceRef="callGetServiceInstance" targetRef="ScriptTask_05m3m2e" />
<bpmn2:callActivity id="CallActivity_1yap348" name="Delete BRG Resources&#10;" calledElement="DoDeleteAllottedResourceBRG">
<bpmn2:extensionElements>
<camunda:in source="msoRequestId" target="msoRequestId" />
@@ -508,11 +493,8 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
<dc:Bounds x="491" y="1072" width="70" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_0nmoax4_di" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="285" y="254" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_05m3m2e_di" bpmnElement="ScriptTask_05m3m2e">
- <dc:Bounds x="476" y="254" width="100" height="80" />
+ <dc:Bounds x="382" y="254" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_112zjtp_di" bpmnElement="IntermediateCatchEvent_112zjtp">
<dc:Bounds x="96" y="276" width="36" height="36" />
@@ -528,16 +510,16 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0jek18q_di" bpmnElement="SequenceFlow_0jek18q">
<di:waypoint xsi:type="dc:Point" x="132" y="294" />
- <di:waypoint xsi:type="dc:Point" x="285" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="382" y="294" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="209" y="279" width="0" height="0" />
+ <dc:Bounds x="212" y="279" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_18103ca_di" bpmnElement="SequenceFlow_18103ca">
- <di:waypoint xsi:type="dc:Point" x="576" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="482" y="294" />
<di:waypoint xsi:type="dc:Point" x="732" y="294" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="654" y="279" width="0" height="0" />
+ <dc:Bounds x="562" y="279" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_04ao07f_di" bpmnElement="SequenceFlow_04ao07f">
@@ -547,15 +529,6 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
<dc:Bounds x="447" y="1034" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ttswdr_di" bpmnElement="SequenceFlow_1ttswdr">
- <di:waypoint xsi:type="dc:Point" x="385" y="294" />
- <di:waypoint xsi:type="dc:Point" x="422" y="294" />
- <di:waypoint xsi:type="dc:Point" x="422" y="294" />
- <di:waypoint xsi:type="dc:Point" x="476" y="294" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="437" y="294" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_06llof4_di" bpmnElement="SequenceFlow_06llof4">
<di:waypoint xsi:type="dc:Point" x="159" y="1466" />
<di:waypoint xsi:type="dc:Point" x="237" y="1466" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
index 28bd3f76ea..1be30d62e4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="UpdateCustomE2EServiceInstance" name="UpdateCustomE2EServiceInstance" isExecutable="true">
<bpmn:startEvent id="StartEvent_00qj6ro" name="Update SI Start Flow">
<bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
@@ -176,29 +176,13 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0je30si" sourceRef="ScriptTask_0ttvn8r" targetRef="CallActivity_02fyxz0" />
<bpmn:sequenceFlow id="SequenceFlow_1fueo69" name="no" sourceRef="ExclusiveGateway_0aqn64l" targetRef="EndEvent_07uk5iy" />
- <bpmn:callActivity id="CallActivity_1vejucv" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
+ <bpmn:scriptTask id="ScriptTask_0cx1y0g" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0az1n4y</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1bd4711</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:scriptTask id="ScriptTask_0cx1y0g" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1bd4711</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_03i6zhx</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new UpdateCustomE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn:script>
+dcsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1bd4711" sourceRef="CallActivity_1vejucv" targetRef="ScriptTask_0cx1y0g" />
<bpmn:scriptTask id="ScriptTask_11y3uq6" name="Post for Compare Model Versions" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0xhbobd</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0t7zinj</bpmn:outgoing>
@@ -237,7 +221,7 @@ ddsi.preCompareModelVersions(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_0zmd4rt</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1n8h3zt</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0az1n4y" sourceRef="ScriptTask_1s09c7d" targetRef="CallActivity_1vejucv" />
+ <bpmn:sequenceFlow id="SequenceFlow_0az1n4y" sourceRef="ScriptTask_1s09c7d" targetRef="ScriptTask_0cx1y0g" />
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0m01dm3" name="StartDoUpdate">
<bpmn:outgoing>SequenceFlow_04qwbbf</bpmn:outgoing>
<bpmn:linkEventDefinition name="StartDoUpdate" />
@@ -354,7 +338,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
- <dc:Bounds x="105" y="158" width="100" height="80" />
+ <dc:Bounds x="147" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0ttvn8r_di" bpmnElement="ScriptTask_0ttvn8r">
<dc:Bounds x="782" y="585" width="100" height="80" />
@@ -382,9 +366,9 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0s2spoq_di" bpmnElement="SequenceFlow_0s2spoq">
<di:waypoint xsi:type="dc:Point" x="30" y="198" />
- <di:waypoint xsi:type="dc:Point" x="105" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="22.5" y="177" width="90" height="12" />
+ <dc:Bounds x="43.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
@@ -500,40 +484,30 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<dc:Bounds x="875" y="991" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1vejucv_di" bpmnElement="CallActivity_1vejucv">
- <dc:Bounds x="274" y="158" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0cx1y0g_di" bpmnElement="ScriptTask_0cx1y0g">
- <dc:Bounds x="451" y="158" width="100" height="80" />
+ <dc:Bounds x="364" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1bd4711_di" bpmnElement="SequenceFlow_1bd4711">
- <di:waypoint xsi:type="dc:Point" x="374" y="198" />
- <di:waypoint xsi:type="dc:Point" x="451" y="198" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="367.5" y="177" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_11y3uq6_di" bpmnElement="ScriptTask_11y3uq6">
<dc:Bounds x="959" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0hixtxc_di" bpmnElement="ScriptTask_0hixtxc">
- <dc:Bounds x="614" y="158" width="100" height="80" />
+ <dc:Bounds x="563" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1rkoyc5_di" bpmnElement="CallActivity_1rkoyc5">
<dc:Bounds x="782" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_03i6zhx_di" bpmnElement="SequenceFlow_03i6zhx">
- <di:waypoint xsi:type="dc:Point" x="551" y="198" />
- <di:waypoint xsi:type="dc:Point" x="614" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="537.5" y="177" width="90" height="12" />
+ <dc:Bounds x="468.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1pdv4qj_di" bpmnElement="SequenceFlow_1pdv4qj">
- <di:waypoint xsi:type="dc:Point" x="714" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="663" y="198" />
<di:waypoint xsi:type="dc:Point" x="782" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="703" y="177" width="90" height="12" />
+ <dc:Bounds x="677.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xhbobd_di" bpmnElement="SequenceFlow_0xhbobd">
@@ -550,10 +524,10 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0az1n4y_di" bpmnElement="SequenceFlow_0az1n4y">
- <di:waypoint xsi:type="dc:Point" x="205" y="198" />
- <di:waypoint xsi:type="dc:Point" x="274" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="247" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="239.5" y="177" width="0" height="12" />
+ <dc:Bounds x="260.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_0m01dm3_di" bpmnElement="IntermediateCatchEvent_0m01dm3">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
index c04c2d97ea..73d3687bfa 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="DoCompareModelofE2EServiceInstance" name="DoCompareModelofE2EServiceInstance" isExecutable="true">
<bpmn2:sequenceFlow id="SequenceFlow_1rebkae" sourceRef="StartEvent_0jhv664" targetRef="CallActivity_1va14ul" />
<bpmn2:intermediateCatchEvent id="StartEvent_0jhv664" name="StartCompare">
@@ -70,30 +70,14 @@ def dcsi = new DoCompareModelofE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_1a3n88w" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="ScriptTask_18k4xnm" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1xzphe4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0b6eqin</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_18k4xnm" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0b6eqin</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1cpg3ku</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoCompareModelofE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
+dcsi.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1xzphe4" name="" sourceRef="ScriptTask_0ba0el1" targetRef="CallActivity_1a3n88w" />
- <bpmn2:sequenceFlow id="SequenceFlow_0b6eqin" sourceRef="CallActivity_1a3n88w" targetRef="ScriptTask_18k4xnm" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xzphe4" name="" sourceRef="ScriptTask_0ba0el1" targetRef="ScriptTask_18k4xnm" />
<bpmn2:sequenceFlow id="SequenceFlow_1cpg3ku" sourceRef="ScriptTask_18k4xnm" targetRef="IntermediateThrowEvent_1dhdmdy" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -102,9 +86,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCompareModelofE2EServiceInstance">
<bpmndi:BPMNEdge id="SequenceFlow_1rebkae_di" bpmnElement="SequenceFlow_1rebkae">
<di:waypoint xsi:type="dc:Point" x="6" y="259" />
- <di:waypoint xsi:type="dc:Point" x="363" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="211" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="139.5" y="238" width="90" height="12" />
+ <dc:Bounds x="63.5" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_05z1jyy_di" bpmnElement="StartEvent_0jhv664">
@@ -114,16 +98,16 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0x8im5g_di" bpmnElement="EndEvent_0x8im5g">
- <dc:Bounds x="1038" y="241" width="36" height="36" />
+ <dc:Bounds x="912" y="241" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1011" y="281" width="90" height="12" />
+ <dc:Bounds x="885" y="281" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lkpfe2_di" bpmnElement="SequenceFlow_1lkpfe2">
- <di:waypoint xsi:type="dc:Point" x="801" y="259" />
- <di:waypoint xsi:type="dc:Point" x="1038" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="874.5" y="238" width="90" height="12" />
+ <dc:Bounds x="714.5" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_0roysbg_di" bpmnElement="SubProcess_0roysbg" isExpanded="true">
@@ -165,9 +149,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1dhdmdy_di" bpmnElement="IntermediateThrowEvent_1dhdmdy">
- <dc:Bounds x="1048" y="83" width="36" height="36" />
+ <dc:Bounds x="853" y="83" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1023" y="123" width="88" height="36" />
+ <dc:Bounds x="838" y="123" width="68" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1chfao3_di" bpmnElement="SequenceFlow_1chfao3">
@@ -178,48 +162,36 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1va14ul_di" bpmnElement="CallActivity_1va14ul">
- <dc:Bounds x="363" y="219" width="100" height="80" />
+ <dc:Bounds x="211" y="219" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1odhh8p_di" bpmnElement="ScriptTask_1odhh8p">
- <dc:Bounds x="701" y="219" width="100" height="80" />
+ <dc:Bounds x="507" y="219" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1pe6r93_di" bpmnElement="SequenceFlow_1pe6r93">
- <di:waypoint xsi:type="dc:Point" x="463" y="259" />
- <di:waypoint xsi:type="dc:Point" x="701" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="537" y="238" width="90" height="12" />
+ <dc:Bounds x="364" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0ba0el1_di" bpmnElement="ScriptTask_0ba0el1">
<dc:Bounds x="211" y="61" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1a3n88w_di" bpmnElement="CallActivity_1a3n88w">
- <dc:Bounds x="499" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_18k4xnm_di" bpmnElement="ScriptTask_18k4xnm">
- <dc:Bounds x="776" y="61" width="100" height="80" />
+ <dc:Bounds x="507" y="61" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xzphe4_di" bpmnElement="SequenceFlow_1xzphe4">
- <di:waypoint xsi:type="dc:Point" x="311" y="101" />
- <di:waypoint xsi:type="dc:Point" x="499" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="360" y="85" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0b6eqin_di" bpmnElement="SequenceFlow_0b6eqin">
- <di:waypoint xsi:type="dc:Point" x="599" y="99" />
- <di:waypoint xsi:type="dc:Point" x="776" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="102" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="101" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="643.5" y="79" width="0" height="12" />
+ <dc:Bounds x="364" y="80.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1cpg3ku_di" bpmnElement="SequenceFlow_1cpg3ku">
- <di:waypoint xsi:type="dc:Point" x="876" y="101" />
- <di:waypoint xsi:type="dc:Point" x="968" y="101" />
- <di:waypoint xsi:type="dc:Point" x="968" y="101" />
- <di:waypoint xsi:type="dc:Point" x="1048" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="101" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="983" y="95" width="0" height="12" />
+ <dc:Bounds x="685" y="80" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
index d7bd54cc4e..6f1609c566 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
@@ -1,5 +1,5 @@
<?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="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="_DkzPAHB4EeaJwpcpVN5gXw" 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="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -13,49 +13,16 @@ DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="GetAAIServiceInstance" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Input Service Instance Id Not Found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="GetAAIServiceInstance" name="Get AAI Service Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="CSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="CSI_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="CSI_resourceLink" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_service" target="CSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="GetAAIServiceInstance" targetRef="ServiceInstanceExists" />
- <bpmn2:exclusiveGateway id="ServiceInstanceExists" name="Service Instance Exists in AAI?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="ServiceInstanceExists" targetRef="buildWorkflowException" />
<bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1a2mcyk</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0gbsa12</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.getAaiAR(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:scriptTask id="CreateAAIAR" name="Create AAI AR&#10;" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_17p4ohs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
@@ -181,45 +148,7 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
<bpmn2:sequenceFlow id="SequenceFlow_1dgzhsm" sourceRef="UpdateAAIARActive" targetRef="IntermediateCatchEvent_1f4tse6" />
- <bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_SuccessIndicator" target="PSI_SuccessIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="PSI_FoundIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="PSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="PSI_resourceLink" />
- <camunda:out source="GENGS_service" target="PSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="ParentSIExists" />
- <bpmn2:exclusiveGateway id="ParentSIExists" name="Parent Service Instance Exists in AAI?" default="SequenceFlow_0f7u5pu">
- <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17p4ohs</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0f7u5pu</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_17p4ohs" name="Yes" sourceRef="ParentSIExists" targetRef="CreateAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PSI_FoundIndicator" ) == true && execution.getVariable("PSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_1hzsbck" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0f7u5pu</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16o7col</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "BRG alloted resource Parent ServiceInstance:" +
-execution.getVariable("parentServiceInstanceId") +
- " was not found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_0x4moh8">
- <bpmn2:incoming>SequenceFlow_16o7col</bpmn2:incoming>
- <bpmn2:errorEventDefinition errorRef="Error_2" />
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0f7u5pu" name="No" sourceRef="ParentSIExists" targetRef="ScriptTask_1hzsbck" />
- <bpmn2:sequenceFlow id="SequenceFlow_16o7col" sourceRef="ScriptTask_1hzsbck" targetRef="EndEvent_0x4moh8" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="CreateAAIAR" />
<bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_1ibe7qx">
<bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
@@ -314,9 +243,6 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:linkEventDefinition name="SDNCTasks" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="ServiceInstanceExists" targetRef="GetAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CSI_FoundIndicator" ) == true && execution.getVariable("CSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_0gbsa12" sourceRef="GetAAIAR" targetRef="ActiveARinAAI" />
<bpmn2:scriptTask id="generateOutputs" name="Generate Outputs" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1iy3cqb</bpmn2:incoming>
@@ -334,6 +260,22 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:timerEventDefinition>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="SequenceFlow_0ec9eiq" sourceRef="IntermediateCatchEvent_1f4tse6" targetRef="PreProcessSDNCGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a2mcyk" sourceRef="GetAAIServiceInstance" targetRef="GetAAIAR" />
+ <bpmn2:scriptTask id="GetAAIServiceInstance" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1a2mcyk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getServiceInstance(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="GetAAIParentSI" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getParentServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -357,57 +299,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="119" y="239" />
- <di:waypoint xsi:type="dc:Point" x="195" y="239" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="157" y="224" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="GetAAIServiceInstance">
- <dc:Bounds x="195" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="ServiceInstanceExists" isMarkerVisible="true">
- <dc:Bounds x="367" y="217" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="349" y="270" width="83" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="295" y="239" />
- <di:waypoint xsi:type="dc:Point" x="369" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="332" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="342" y="85" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="392" y="217" />
- <di:waypoint xsi:type="dc:Point" x="392" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="241" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="371" y="192.6917250252067" width="14" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="374" y="-11" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="392" y="30" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="392" y="85" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="25" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="407" y="58" width="0" height="0" />
+ <dc:Bounds x="135" y="224.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
<dc:Bounds x="506" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="CreateAAIAR">
- <dc:Bounds x="1206" y="200" width="100" height="80" />
+ <dc:Bounds x="1086" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
<dc:Bounds x="1527" y="776" width="36" height="36" />
@@ -416,11 +317,10 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300">
- <di:waypoint xsi:type="dc:Point" x="1306" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1338" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1408" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1311" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1322" y="225" width="0" height="0" />
+ <dc:Bounds x="1203.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
@@ -545,51 +445,12 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="934" y="593.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
- <dc:Bounds x="843" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1vg5rfa_di" bpmnElement="SequenceFlow_1vg5rfa">
<di:waypoint xsi:type="dc:Point" x="943" y="239" />
- <di:waypoint xsi:type="dc:Point" x="1033" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="988" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1q51t9m_di" bpmnElement="ParentSIExists" isMarkerVisible="true">
- <dc:Bounds x="1033" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1012" y="265" width="92" height="36" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17p4ohs_di" bpmnElement="SequenceFlow_17p4ohs">
- <di:waypoint xsi:type="dc:Point" x="1083" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1206" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="241" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1127" y="222" width="19" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1hzsbck_di" bpmnElement="ScriptTask_1hzsbck">
- <dc:Bounds x="1008" y="77" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0x4moh8_di" bpmnElement="EndEvent_0x4moh8">
- <dc:Bounds x="1040" y="6" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1058" y="47" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0f7u5pu_di" bpmnElement="SequenceFlow_0f7u5pu">
- <di:waypoint xsi:type="dc:Point" x="1058" y="215" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="186" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1034" y="173.413457125764" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_16o7col_di" bpmnElement="SequenceFlow_16o7col">
- <di:waypoint xsi:type="dc:Point" x="1059" y="77" />
- <di:waypoint xsi:type="dc:Point" x="1059" y="42" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1074" y="59.5" width="0" height="0" />
+ <dc:Bounds x="955.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
@@ -672,7 +533,7 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<di:waypoint xsi:type="dc:Point" x="750" y="240" />
<di:waypoint xsi:type="dc:Point" x="843" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="777" y="224" width="14" height="14" />
+ <dc:Bounds x="777" y="223.99999999999994" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
@@ -698,18 +559,11 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
- <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <dc:Bounds x="1311" y="222" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1456" y="234" width="76" height="12" />
+ <dc:Bounds x="1359" y="234" width="77" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="416" y="241" />
- <di:waypoint xsi:type="dc:Point" x="506" y="242" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="432" y="220.27119611047112" width="17" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0gbsa12_di" bpmnElement="SequenceFlow_0gbsa12">
<di:waypoint xsi:type="dc:Point" x="606" y="240" />
<di:waypoint xsi:type="dc:Point" x="700" y="240" />
@@ -750,6 +604,19 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1061" y="524" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a2mcyk_di" bpmnElement="SequenceFlow_1a2mcyk">
+ <di:waypoint xsi:type="dc:Point" x="341" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="506" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="423.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0m6hxaw_di" bpmnElement="GetAAIServiceInstance">
+ <dc:Bounds x="241" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0m8m8j1_di" bpmnElement="GetAAIParentSI">
+ <dc:Bounds x="843" y="199" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
index f26bae0b39..3deaae4e0d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
@@ -1,5 +1,5 @@
<?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="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="_DkzPAHB4EeaJwpcpVN5gXw" 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="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -12,50 +12,17 @@
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="GetAAIServiceInstance" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Input Service Instance Id Not Found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="GetAAIServiceInstance" name="Get AAI Service Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="CSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="CSI_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="CSI_resourceLink" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_service" target="CSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="GetAAIServiceInstance" targetRef="ServiceInstanceExists" />
- <bpmn2:exclusiveGateway id="ServiceInstanceExists" name="Service Instance Exists in AAI?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="ServiceInstanceExists" targetRef="buildWorkflowException" />
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="ScriptTask_0n6wvp0" />
<bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_01zb7a0</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0gbsa12</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.getAaiAR(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:scriptTask id="CreateAAIAR" name="Create AAI AR&#10;" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_17p4ohs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0vrw9a9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
@@ -180,45 +147,6 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0q1hz2p</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
- <bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_SuccessIndicator" target="PSI_SuccessIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="PSI_FoundIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="PSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="PSI_resourceLink" />
- <camunda:out source="GENGS_service" target="PSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="ParentSIExists" />
- <bpmn2:exclusiveGateway id="ParentSIExists" name="Parent Service Instance Exists in AAI?" default="SequenceFlow_0f7u5pu">
- <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17p4ohs</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0f7u5pu</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_17p4ohs" name="Yes" sourceRef="ParentSIExists" targetRef="CreateAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PSI_FoundIndicator" ) == true && execution.getVariable("PSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_1hzsbck" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0f7u5pu</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16o7col</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "TunnelXConn alloted resource Parent ServiceInstance:" +
-execution.getVariable("parentServiceInstanceId") +
- " was not found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_0x4moh8">
- <bpmn2:incoming>SequenceFlow_16o7col</bpmn2:incoming>
- <bpmn2:errorEventDefinition errorRef="Error_2" />
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0f7u5pu" name="No" sourceRef="ParentSIExists" targetRef="ScriptTask_1hzsbck" />
- <bpmn2:sequenceFlow id="SequenceFlow_16o7col" sourceRef="ScriptTask_1hzsbck" targetRef="EndEvent_0x4moh8" />
<bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_1ibe7qx">
<bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
@@ -300,7 +228,7 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1m8u8dl</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_0z8luou</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1m8u8dl" name="No" sourceRef="ActiveARinAAI" targetRef="GetAAIParentSI" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1m8u8dl" name="No" sourceRef="ActiveARinAAI" targetRef="ScriptTask_10d76y6" />
<bpmn2:sequenceFlow id="SequenceFlow_0z8luou" name="yes" sourceRef="ActiveARinAAI" targetRef="PreProcessSDNCGet">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("foundActiveAR" ) == true}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
@@ -313,9 +241,6 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:linkEventDefinition name="SDNCTasks" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="ServiceInstanceExists" targetRef="GetAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CSI_FoundIndicator" ) == true && execution.getVariable("CSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_0gbsa12" sourceRef="GetAAIAR" targetRef="ActiveARinAAI" />
<bpmn2:scriptTask id="generateOutputs" name="Generate Outputs" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1iy3cqb</bpmn2:incoming>
@@ -334,6 +259,23 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:timerEventDefinition>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="SequenceFlow_08hhqb2" sourceRef="IntermediateThrowEvent_0ti2fv8" targetRef="PreProcessSDNCGet" />
+ <bpmn2:scriptTask id="ScriptTask_0n6wvp0" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01zb7a0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getServiceInstance(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_10d76y6" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vrw9a9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getParentServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01zb7a0" sourceRef="ScriptTask_0n6wvp0" targetRef="GetAAIAR" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vrw9a9" sourceRef="ScriptTask_10d76y6" targetRef="CreateAAIAR" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -357,57 +299,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="119" y="239" />
- <di:waypoint xsi:type="dc:Point" x="195" y="239" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="157" y="224" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="GetAAIServiceInstance">
- <dc:Bounds x="195" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="ServiceInstanceExists" isMarkerVisible="true">
- <dc:Bounds x="367" y="217" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="349" y="270" width="83" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="295" y="239" />
- <di:waypoint xsi:type="dc:Point" x="369" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="332" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="342" y="85" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="392" y="217" />
- <di:waypoint xsi:type="dc:Point" x="392" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="261" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="371" y="192.6917250252067" width="14" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="374" y="-11" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="392" y="30" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="392" y="85" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="25" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="407" y="58" width="0" height="0" />
+ <dc:Bounds x="145" y="224.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
- <dc:Bounds x="506" y="200" width="100" height="80" />
+ <dc:Bounds x="478" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="CreateAAIAR">
- <dc:Bounds x="1206" y="200" width="100" height="80" />
+ <dc:Bounds x="1099" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
<dc:Bounds x="1527" y="776" width="36" height="36" />
@@ -416,11 +317,10 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300">
- <di:waypoint xsi:type="dc:Point" x="1306" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1338" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1408" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1199" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1309" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1322" y="225" width="0" height="0" />
+ <dc:Bounds x="1209" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
@@ -538,53 +438,6 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1277" y="779" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
- <dc:Bounds x="843" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1vg5rfa_di" bpmnElement="SequenceFlow_1vg5rfa">
- <di:waypoint xsi:type="dc:Point" x="943" y="239" />
- <di:waypoint xsi:type="dc:Point" x="1033" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="988" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1q51t9m_di" bpmnElement="ParentSIExists" isMarkerVisible="true">
- <dc:Bounds x="1033" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1012" y="265" width="92" height="36" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17p4ohs_di" bpmnElement="SequenceFlow_17p4ohs">
- <di:waypoint xsi:type="dc:Point" x="1083" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1206" y="241" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1127" y="222" width="19" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1hzsbck_di" bpmnElement="ScriptTask_1hzsbck">
- <dc:Bounds x="1008" y="77" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0x4moh8_di" bpmnElement="EndEvent_0x4moh8">
- <dc:Bounds x="1040" y="6" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1058" y="47" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0f7u5pu_di" bpmnElement="SequenceFlow_0f7u5pu">
- <di:waypoint xsi:type="dc:Point" x="1058" y="215" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="186" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1034" y="173.413457125764" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_16o7col_di" bpmnElement="SequenceFlow_16o7col">
- <di:waypoint xsi:type="dc:Point" x="1059" y="77" />
- <di:waypoint xsi:type="dc:Point" x="1059" y="42" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1074" y="59.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
<dc:Bounds x="53" y="910" width="783" height="195" />
</bpmndi:BPMNShape>
@@ -663,9 +516,9 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1m8u8dl_di" bpmnElement="SequenceFlow_1m8u8dl">
<di:waypoint xsi:type="dc:Point" x="750" y="240" />
- <di:waypoint xsi:type="dc:Point" x="843" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="893" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="777" y="224" width="14" height="14" />
+ <dc:Bounds x="795.4388439306359" y="224.36614831617715" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
@@ -691,23 +544,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
- <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <dc:Bounds x="1309" y="222" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1456" y="234" width="76" height="12" />
+ <dc:Bounds x="1357" y="234" width="77" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="416" y="241" />
- <di:waypoint xsi:type="dc:Point" x="506" y="242" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="432" y="220.27119611047112" width="17" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0gbsa12_di" bpmnElement="SequenceFlow_0gbsa12">
- <di:waypoint xsi:type="dc:Point" x="606" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="578" y="240" />
<di:waypoint xsi:type="dc:Point" x="700" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="653" y="225" width="0" height="0" />
+ <dc:Bounds x="594" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0pjzuns_di" bpmnElement="generateOutputs">
@@ -750,6 +596,26 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1061" y="524" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0n6wvp0_di" bpmnElement="ScriptTask_0n6wvp0">
+ <dc:Bounds x="261" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_10d76y6_di" bpmnElement="ScriptTask_10d76y6">
+ <dc:Bounds x="893" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01zb7a0_di" bpmnElement="SequenceFlow_01zb7a0">
+ <di:waypoint xsi:type="dc:Point" x="361" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="419.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vrw9a9_di" bpmnElement="SequenceFlow_0vrw9a9">
+ <di:waypoint xsi:type="dc:Point" x="993" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1099" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1046" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
index 07de3fc0b1..3fea7467c5 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
@@ -33,32 +33,17 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn:script>
<bpmn:endEvent id="EndEvent_0tpifgl">
<bpmn:incoming>SequenceFlow_0o6bjmn</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:callActivity id="CallActivity_11yzhx1" name="Call CustomE2EGetService2" calledElement="CustomE2EGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="subscriptionServiceType" target="GENGS_serviceType" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn:extensionElements>
+ <bpmn:scriptTask id="ScriptTask_0yz4lym" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0k06cqp</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1oql7zl</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:scriptTask id="ScriptTask_0yz4lym" name="Post Process AAI GET2" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1oql7zl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0o6bjmn</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoCreateE2EServiceInstance()
-dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
+dcsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0s7w7gp" name="" sourceRef="ScriptTask_16gvaru" targetRef="CallActivity_0ao684p" />
<bpmn:sequenceFlow id="SequenceFlow_1wtx8gj" name="" sourceRef="CallActivity_0ao684p" targetRef="ScriptTask_0dp0qqq" />
- <bpmn:sequenceFlow id="SequenceFlow_0k06cqp" name="" sourceRef="ScriptTask_0dp0qqq" targetRef="CallActivity_11yzhx1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0k06cqp" name="" sourceRef="ScriptTask_0dp0qqq" targetRef="ScriptTask_0yz4lym" />
<bpmn:sequenceFlow id="SequenceFlow_0o6bjmn" sourceRef="ScriptTask_0yz4lym" targetRef="EndEvent_0tpifgl" />
- <bpmn:sequenceFlow id="SequenceFlow_1oql7zl" sourceRef="CallActivity_11yzhx1" targetRef="ScriptTask_0yz4lym" />
<bpmn:sequenceFlow id="SequenceFlow_1gomb9n" sourceRef="StartEvent_1" targetRef="ScriptTask_16gvaru" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
@@ -81,9 +66,6 @@ dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
<dc:Bounds x="1405" y="143" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_11yzhx1_di" bpmnElement="CallActivity_11yzhx1">
- <dc:Bounds x="983" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0yz4lym_di" bpmnElement="ScriptTask_0yz4lym">
<dc:Bounds x="1219" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -102,26 +84,17 @@ dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0k06cqp_di" bpmnElement="SequenceFlow_0k06cqp">
- <di:waypoint xsi:type="dc:Point" x="854" y="120" />
- <di:waypoint xsi:type="dc:Point" x="891" y="120" />
- <di:waypoint xsi:type="dc:Point" x="983" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="854" y="119" />
+ <di:waypoint xsi:type="dc:Point" x="1219" y="116" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="872.5" y="99" width="0" height="12" />
+ <dc:Bounds x="991.5" y="96.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0o6bjmn_di" bpmnElement="SequenceFlow_0o6bjmn">
<di:waypoint xsi:type="dc:Point" x="1319" y="120" />
<di:waypoint xsi:type="dc:Point" x="1432" y="120" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1375.5" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1oql7zl_di" bpmnElement="SequenceFlow_1oql7zl">
- <di:waypoint xsi:type="dc:Point" x="1083" y="115" />
- <di:waypoint xsi:type="dc:Point" x="1151" y="115" />
- <di:waypoint xsi:type="dc:Point" x="1219" y="115" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1117" y="94" width="0" height="12" />
+ <dc:Bounds x="1331" y="99" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1gomb9n_di" bpmnElement="SequenceFlow_1gomb9n">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index a5fadcf14b..0b890d8573 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?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: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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateE2EServiceInstanceV3" name="DoCreateE2EServiceInstanceV3" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
@@ -12,21 +12,6 @@ def dcsi = new DoCreateE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" />
- <bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- </bpmn2:extensionElements>
- <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">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -38,7 +23,7 @@ dcsi.preProcessRequest(execution)
<camunda:in source="msoRequestId" target="GENPS_requesId" />
<camunda:out source="WorkflowException" target="WorkflowException" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_129ih1g</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="CustomE2EPutService" targetRef="ScriptTask_0q37vn9" />
@@ -82,14 +67,6 @@ dcsi.postProcessRollback(execution)
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1w01tqs</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <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_1tkgqu3</bpmn2:outgoing>
@@ -99,7 +76,7 @@ ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<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_03ebqhf</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1m2tm19</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1qctzm0</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
@@ -179,18 +156,17 @@ dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EPutService" />
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
- <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1m2tm19</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="StartPrepareResource" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_0dqjp43" />
- <bpmn2:scriptTask id="Task_0ush1g4" name="Call Service OOF" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_01s0ef2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_03ebqhf</bpmn2:outgoing>
+ <bpmn2:scriptTask id="Task_0ush1g4" name="Process Site Location" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_13xfsff</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0y3i2k7</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi= new DoCreateE2EServiceInstance()
-dcsi.doServiceHoming(execution)]]></bpmn2:script>
+dcsi.doProcessSiteLocation(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResourcesV3">
<bpmn2:extensionElements>
@@ -214,7 +190,7 @@ dcsi.doServiceHoming(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0d0c20n</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:scriptTask id="ScriptTask_04b21gb" name="PreProcess for Add Resources" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_13xfsff</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0y3i2k7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0bf6bzp</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def csi = new DoCreateE2EServiceInstance()
@@ -227,23 +203,16 @@ csi.preProcessForAddResource(execution)]]></bpmn2:script>
def csi = new DoCreateE2EServiceInstance()
csi.postProcessForAddResource(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13xfsff" sourceRef="Task_0raqlqc" targetRef="ScriptTask_04b21gb" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13xfsff" sourceRef="Task_0raqlqc" targetRef="Task_0ush1g4" />
<bpmn2:sequenceFlow id="SequenceFlow_0bf6bzp" sourceRef="ScriptTask_04b21gb" targetRef="CallActivity_1ojtwas" />
<bpmn2:sequenceFlow id="SequenceFlow_0d0c20n" sourceRef="CallActivity_1ojtwas" targetRef="ScriptTask_1y7jr4t" />
<bpmn2:endEvent id="EndEvent_0hzmoug">
<bpmn2:incoming>SequenceFlow_0a6vgsu</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_0a6vgsu" sourceRef="ScriptTask_1y7jr4t" targetRef="EndEvent_0hzmoug" />
- <bpmn2:sequenceFlow id="SequenceFlow_03ebqhf" sourceRef="Task_0ush1g4" targetRef="Task_0uiekmn" />
<bpmn2:sequenceFlow id="SequenceFlow_012h7yx" sourceRef="ScriptTask_1o01d7d" targetRef="IntermediateThrowEvent_1mlbhmt" />
- <bpmn2:sequenceFlow id="SequenceFlow_01s0ef2" sourceRef="Task_0dqjp43" targetRef="Task_0ush1g4" />
- <bpmn2:scriptTask id="Task_0dqjp43" name="Call Service Pre Operation" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1hbesp9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_01s0ef2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi= new DoCreateE2EServiceInstance()
-dcsi.doServicePreOperation(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1m2tm19" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_0uiekmn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0y3i2k7" sourceRef="Task_0ush1g4" targetRef="ScriptTask_04b21gb" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -258,18 +227,6 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
<dc:Bounds x="126" y="-229" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <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="357" y="94" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="196" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
<dc:Bounds x="713" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -314,18 +271,6 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<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="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="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="616" y="94" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
<dc:Bounds x="1068" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -352,17 +297,17 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0">
- <di:waypoint xsi:type="dc:Point" x="534" y="300" />
- <di:waypoint xsi:type="dc:Point" x="604" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="226" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="337" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="524" y="279" width="90" height="12" />
+ <dc:Bounds x="236.5" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn">
- <dc:Bounds x="434" y="260" width="100" height="80" />
+ <dc:Bounds x="126" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc">
- <dc:Bounds x="604" y="260" width="100" height="80" />
+ <dc:Bounds x="337" y="260" 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" />
@@ -451,9 +396,12 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<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" />
+ <di:waypoint xsi:type="dc:Point" x="528" 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="125" y="76" width="0" height="12" />
+ <dc:Bounds x="542" y="73" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
@@ -462,37 +410,30 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<dc:Bounds x="-3" y="318" width="82" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <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="87" y="300" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="25.5" y="279" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0wr11dt_di" bpmnElement="Task_0ush1g4">
- <dc:Bounds x="277" y="260" width="100" height="80" />
+ <dc:Bounds x="554" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1ojtwas_di" bpmnElement="CallActivity_1ojtwas">
<dc:Bounds x="971" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_04b21gb_di" bpmnElement="ScriptTask_04b21gb">
- <dc:Bounds x="799" y="260" width="100" height="80" />
+ <dc:Bounds x="774" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1y7jr4t_di" bpmnElement="ScriptTask_1y7jr4t">
<dc:Bounds x="1145" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_13xfsff_di" bpmnElement="SequenceFlow_13xfsff">
- <di:waypoint xsi:type="dc:Point" x="704" y="300" />
- <di:waypoint xsi:type="dc:Point" x="799" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="437" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="554" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="706.5" y="279" width="90" height="12" />
+ <dc:Bounds x="450.5" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0bf6bzp_di" bpmnElement="SequenceFlow_0bf6bzp">
- <di:waypoint xsi:type="dc:Point" x="899" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="874" y="300" />
<di:waypoint xsi:type="dc:Point" x="971" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="890" y="279" width="90" height="12" />
+ <dc:Bounds x="877.5" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0d0c20n_di" bpmnElement="SequenceFlow_0d0c20n">
@@ -515,13 +456,6 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<dc:Bounds x="1235" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_03ebqhf_di" bpmnElement="SequenceFlow_03ebqhf">
- <di:waypoint xsi:type="dc:Point" x="377" y="300" />
- <di:waypoint xsi:type="dc:Point" x="434" y="300" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="405.5" y="278" width="0" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_012h7yx_di" bpmnElement="SequenceFlow_012h7yx">
<di:waypoint xsi:type="dc:Point" x="813" y="-39" />
<di:waypoint xsi:type="dc:Point" x="1315" y="-39" />
@@ -529,16 +463,20 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<dc:Bounds x="1064" y="-61" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_01s0ef2_di" bpmnElement="SequenceFlow_01s0ef2">
- <di:waypoint xsi:type="dc:Point" x="187" y="300" />
- <di:waypoint xsi:type="dc:Point" x="277" y="300" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1m2tm19_di" bpmnElement="SequenceFlow_1m2tm19">
+ <di:waypoint xsi:type="dc:Point" x="54" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="232" y="278" width="0" height="14" />
+ <dc:Bounds x="90" y="278" width="0" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0y3i2k7_di" bpmnElement="SequenceFlow_0y3i2k7">
+ <di:waypoint xsi:type="dc:Point" x="654" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="714" y="278" width="0" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1uhlqf5_di" bpmnElement="Task_0dqjp43">
- <dc:Bounds x="87" y="260" width="100" height="80" />
- </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
index 4c107c7cb4..77c62e573d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
@@ -1,5 +1,5 @@
<?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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="DoCreateE2EServiceInstanceV2" name="DoCreateE2EServiceInstanceV2" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -13,21 +13,7 @@ def dcsi = new DoCreateE2EServiceInstanceV2()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy_PostProcessAAIGET" />
- <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" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0aggdcl_GoToStartService" />
<bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -83,13 +69,6 @@ dcsi.postProcessRollback(execution)
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy_PostProcessAAIGET" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10aubhh</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateE2EServiceInstanceV2()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_0q37vn9_PostProcessAAIPUT" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_03fabby</bpmn2:outgoing>
@@ -225,9 +204,8 @@ def csi = new DoCreateE2EServiceInstanceV2()
csi.postOtherControllerType(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_0gxsqsa" sourceRef="Task_0zhvu4r_llllll" targetRef="ExclusiveGateway_0r4jkig" />
- <bpmn2:sequenceFlow id="SequenceFlow_10aubhh" sourceRef="ScriptTask_0i8cqdy_PostProcessAAIGET" targetRef="IntermediateThrowEvent_0aggdcl_GoToStartService" />
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0aggdcl_GoToStartService" name="GoTo StartService">
- <bpmn2:incoming>SequenceFlow_10aubhh</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateThrowEvent>
<bpmn2:intermediateCatchEvent id="StartEvent_0l5bz4h_StartService" name="StartService">
@@ -486,23 +464,13 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="59.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="664" y="97" />
- <di:waypoint xsi:type="dc:Point" x="917" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="745.5" y="82" 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">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="IntermediateThrowEvent_1m5zb3d_di">
<di:waypoint xsi:type="dc:Point" x="287" y="97" />
- <di:waypoint xsi:type="dc:Point" x="564" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="380.5" y="82" width="90" height="0" />
+ <dc:Bounds x="718" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="564" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
<dc:Bounds x="564" y="244" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -545,9 +513,6 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="126" y="1831" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy_PostProcessAAIGET">
- <dc:Bounds x="917" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9_PostProcessAAIPUT">
<dc:Bounds x="917" y="244" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -752,13 +717,6 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="312.5" y="1193" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_10aubhh_di" bpmnElement="SequenceFlow_10aubhh">
- <di:waypoint xsi:type="dc:Point" x="1017" y="97" />
- <di:waypoint xsi:type="dc:Point" x="1239" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1128" y="76" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1m5zb3d_di" bpmnElement="IntermediateThrowEvent_0aggdcl_GoToStartService">
<dc:Bounds x="1239" y="79" width="36" height="36" />
<bpmndi:BPMNLabel>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
index 12dbfe6dde..2f5fa39dbc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2: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="DoCreateNetworkInstance" name="DoCreateNetworkInstance" isExecutable="true">
<bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1n61wit</bpmn2:outgoing>
@@ -332,19 +332,6 @@ DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
</bpmn2:endEvent>
</bpmn2:subProcess>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="CRENWKI_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_serviceInstance" target="CRENWKI_serviceInstance" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
- <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- </bpmn2:callActivity>
<bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query Network Name In AAI" scriptFormat="groovy">
<bpmn2:incoming>isNameSentYes_SequenceFlow</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
@@ -353,23 +340,7 @@ def DoCreateNetworkInstance = new DoCreateNetworkInstance()
DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isAAIQueryNameOk_ExclusiveGateway" />
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
- <bpmn2:exclusiveGateway id="siFoundCheck" name="Service Instance Found?" default="siFoundNo">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
- <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="isNameSent_ExclusiveGateway">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
- <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance Not Found")
-]]></bpmn2:script>
- </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="isNameSent_ExclusiveGateway" />
<bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
@@ -413,7 +384,7 @@ DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_0ftylq3" sourceRef="ScriptTask_preprocess" targetRef="callGetServiceInstance" />
<bpmn2:exclusiveGateway id="isNameSent_ExclusiveGateway" name="is Network Name &#10;Sent?&#10;" default="isNameSentNo_SequenceFlow">
- <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>isNameSentYes_SequenceFlow</bpmn2:outgoing>
<bpmn2:outgoing>isNameSentNo_SequenceFlow</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
@@ -535,6 +506,13 @@ def DoCreateNetworkInstance = new DoCreateNetworkInstance()
DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_18ylufb" sourceRef="ScriptTask_0p3v749" targetRef="EndEvent_0ti2ctu" />
+ <bpmn2:scriptTask id="callGetServiceInstance" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
<bpmn2:textAnnotation id="TextAnnotation_1orb6o6"> <bpmn2:text><![CDATA[if '200', Prepare PO Network Rollback]]></bpmn2:text>
</bpmn2:textAnnotation>
<bpmn2:association id="Association_0c315jr" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="TextAnnotation_1orb6o6" />
@@ -898,37 +876,12 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<dc:Bounds x="301" y="476" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="759" y="155" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="784" y="291" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="696" y="304" width="80" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="ScriptTask_0z2n0hl_di" targetElement="ExclusiveGateway_0lw40k5_di">
<di:waypoint xsi:type="dc:Point" x="809" y="235" />
- <di:waypoint xsi:type="dc:Point" x="809" y="291" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="824" y="263" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_62">
- <di:waypoint xsi:type="dc:Point" x="834" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="316" />
<di:waypoint xsi:type="dc:Point" x="951" y="316" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="851" y="319" width="18" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds x="759" y="395" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
- <di:waypoint xsi:type="dc:Point" x="809" y="341" />
- <di:waypoint xsi:type="dc:Point" x="809" y="395" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="823" y="340.55618916742606" width="14" height="13" />
+ <dc:Bounds x="779" y="275.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
@@ -961,7 +914,7 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<di:waypoint xsi:type="dc:Point" x="706" y="195" />
<di:waypoint xsi:type="dc:Point" x="759" y="195" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="721" y="195" width="0" height="0" />
+ <dc:Bounds x="676" y="195" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_0lw40k5_di" bpmnElement="isNameSent_ExclusiveGateway" isMarkerVisible="true">
@@ -1358,6 +1311,9 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<dc:Bounds x="287" y="1159" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z2n0hl_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="759" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
index 29116a67fc..2c6f5ee61d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2: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="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -12,7 +12,7 @@
def dcsi = new DoCreateServiceInstance()
dcsi.getAAICustomerById(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="callGenericPutService" />
<bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
@@ -21,7 +21,6 @@ def dcsi = new DoCreateServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGenericGetService" targetRef="ScriptTask_0i8cqdy" />
<bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_156ih25</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
@@ -49,24 +48,12 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_01q6pl4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="getAAICustomerById_scriptTask" />
<bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterServiceTopologyAssign" />
<bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallSDNCAdapterServiceTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="CallActivity_1707jgc" />
- <bpmn2:callActivity id="callGenericGetService" name="Call GenericGetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="EndEvent_3" />
<bpmn2:callActivity id="callGenericPutService" name="Call Generic Put Service" calledElement="GenericPutService">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -78,19 +65,9 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
<camunda:in source="msoRequestId" target="GENPS_requesId" />
<camunda:out source="WorkflowException" target="WorkflowException" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1jhzmzn</bpmn2:outgoing>
</bpmn2:callActivity>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="need to check SI name in AAI?" default="SequenceFlow_1uw2p9a">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11fnnkb</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1uw2p9a</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_11fnnkb" name="yes" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericGetService">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("checkAAI" ) == true }]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericPutService" />
<bpmn2:subProcess id="SubProcess_06d8lk8" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_0yljq9y">
<bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
@@ -143,37 +120,6 @@ dcsi.postProcessRollback(execution)
<bpmn2:sequenceFlow id="SequenceFlow_00v4npo" name="yes" sourceRef="ExclusiveGateway_1nk6aol" targetRef="EndEvent_10659gr">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{!execution.getVariable("sendToSDNC")}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1w01tqs</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="callGenericPutService" />
- <bpmn2:callActivity id="CallActivity_1707jgc" name="Call GenericGetService2" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="subscriptionServiceType" target="GENGS_serviceType" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0tx5frq</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_0tx5frq" sourceRef="CallActivity_1707jgc" targetRef="ScriptTask_1tp0fcx" />
- <bpmn2:sequenceFlow id="SequenceFlow_01q6pl4" sourceRef="ScriptTask_1tp0fcx" targetRef="EndEvent_3" />
- <bpmn2:scriptTask id="ScriptTask_1tp0fcx" name="Post Process AAI GET2" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0tx5frq</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_01q6pl4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstance()
-dcsi.postProcessAAIGET2(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1jhzmzn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_16sdyz9</bpmn2:outgoing>
@@ -243,24 +189,18 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_62">
<di:waypoint xsi:type="dc:Point" x="493" y="97" />
- <di:waypoint xsi:type="dc:Point" x="565" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="206" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="529" y="82" width="0" height="0" />
+ <dc:Bounds x="712.5" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds x="1122" y="1297" width="36" height="36" />
+ <dc:Bounds x="1004" y="1216" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1095" y="1338" width="90" height="0" />
+ <dc:Bounds x="977" y="1257" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="839" y="94" />
- <di:waypoint xsi:type="dc:Point" x="971" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="905" y="79" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_334" bpmnElement="PreProcessSDNCAssignRequest">
<dc:Bounds x="972" y="810" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -292,39 +232,15 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_335">
- <di:waypoint xsi:type="dc:Point" x="1024" y="1134" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="1162" />
+ <di:waypoint xsi:type="dc:Point" x="1023" y="1134" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="1216" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="994" y="1148" width="90" height="0" />
+ <dc:Bounds x="977.5" y="1160" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericGetService">
- <dc:Bounds x="739" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="callGenericPutService">
<dc:Bounds x="972" y="206" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
- <dc:Bounds x="565" y="72" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="547" y="27" width="85" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
- <di:waypoint xsi:type="dc:Point" x="615" y="97" />
- <di:waypoint xsi:type="dc:Point" x="739" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="635" y="76" width="18" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
- <di:waypoint xsi:type="dc:Point" x="590" y="122" />
- <di:waypoint xsi:type="dc:Point" x="590" y="246" />
- <di:waypoint xsi:type="dc:Point" x="972" y="246" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="594" y="132.89706349694825" width="12" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
<dc:Bounds x="99" y="531" width="783" height="195" />
</bpmndi:BPMNShape>
@@ -385,18 +301,6 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
<dc:Bounds x="1050.5" y="718" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
- <dc:Bounds x="971" y="57" 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="172" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="172" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="206" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1036" y="172" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
<dc:Bounds x="330" y="586" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -419,28 +323,6 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
<dc:Bounds x="808" y="626" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1707jgc_di" bpmnElement="CallActivity_1707jgc">
- <dc:Bounds x="972" y="1162" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0tx5frq_di" bpmnElement="SequenceFlow_0tx5frq">
- <di:waypoint xsi:type="dc:Point" x="1022" y="1242" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="1275" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="992" y="1258.5" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_01q6pl4_di" bpmnElement="SequenceFlow_01q6pl4">
- <di:waypoint xsi:type="dc:Point" x="1072" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1094" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1094" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1122" y="1315" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1064" y="1315" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1tp0fcx_di" bpmnElement="ScriptTask_1tp0fcx">
- <dc:Bounds x="972" y="1275" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
<dc:Bounds x="972" y="336" width="100" height="80" />
</bpmndi:BPMNShape>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollbackV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollbackV2.bpmn
deleted file mode 100644
index 88a99c2938..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceRollbackV2.bpmn
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2">
- <bpmn:process id="DoCreateServiceInstanceRollbackV2" name="DoCreateServiceInstanceRollbackV2" isExecutable="true">
- <bpmn:startEvent id="StartEvent_1" name="start">
- <bpmn:outgoing>SequenceFlow_0r35zfs</bpmn:outgoing>
- </bpmn:startEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0r35zfs" sourceRef="StartEvent_1" targetRef="ScriptTask_2" />
- <bpmn:endEvent id="EndEvent_1uwvw04" name="end">
- <bpmn:incoming>SequenceFlow_1f949uf</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_1f949uf" sourceRef="ScriptTask_2" targetRef="EndEvent_1uwvw04" />
- <bpmn:scriptTask id="ScriptTask_2" name="ServiceInstance Rollback (A&#38;AI)" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0r35zfs</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1f949uf</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsir = new DoCreateServiceInstanceRollbackV2()
-dcsir.aaiServiceInstanceRollback(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:subProcess id="SubProcess_06tpqag" triggeredByEvent="true">
- <bpmn:startEvent id="StartEvent_1n34l5n" name="error start">
- <bpmn:outgoing>SequenceFlow_1tnfu1n</bpmn:outgoing>
- <bpmn:errorEventDefinition />
- </bpmn:startEvent>
- <bpmn:sequenceFlow id="SequenceFlow_1tnfu1n" sourceRef="StartEvent_1n34l5n" targetRef="Task_11sf5id" />
- <bpmn:endEvent id="EndEvent_1ldhg44" name="end">
- <bpmn:incoming>SequenceFlow_0hi9120</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0hi9120" sourceRef="Task_11sf5id" targetRef="EndEvent_1ldhg44" />
- <bpmn:scriptTask id="Task_11sf5id" name="Rollback ERROR" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1tnfu1n</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0hi9120</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsir = new DoCreateServiceInstanceRollbackV2()
-dcsir.rollbackError(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- </bpmn:subProcess>
- </bpmn:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceRollbackV2">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
- <dc:Bounds x="223" y="102" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="230" y="138" width="22" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0r35zfs_di" bpmnElement="SequenceFlow_0r35zfs">
- <di:waypoint xsi:type="dc:Point" x="259" y="120" />
- <di:waypoint xsi:type="dc:Point" x="325" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="247" y="99" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_1uwvw04_di" bpmnElement="EndEvent_1uwvw04">
- <dc:Bounds x="490" y="102" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="499" y="142" width="18" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1f949uf_di" bpmnElement="SequenceFlow_1f949uf">
- <di:waypoint xsi:type="dc:Point" x="425" y="120" />
- <di:waypoint xsi:type="dc:Point" x="490" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="412.5" y="99" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0kr8b5y_di" bpmnElement="ScriptTask_2">
- <dc:Bounds x="325" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="SubProcess_03s2qcr_di" bpmnElement="SubProcess_06tpqag" isExpanded="true">
- <dc:Bounds x="200" y="216" width="350" height="200" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StartEvent_1nwdcsr_di" bpmnElement="StartEvent_1n34l5n">
- <dc:Bounds x="229" y="295" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="223" y="335" width="49" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1tnfu1n_di" bpmnElement="SequenceFlow_1tnfu1n">
- <di:waypoint xsi:type="dc:Point" x="265" y="313" />
- <di:waypoint xsi:type="dc:Point" x="318" y="313" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="291.5" y="292" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_1ldhg44_di" bpmnElement="EndEvent_1ldhg44">
- <dc:Bounds x="453" y="295" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="462" y="335" width="18" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0hi9120_di" bpmnElement="SequenceFlow_0hi9120">
- <di:waypoint xsi:type="dc:Point" x="418" y="313" />
- <di:waypoint xsi:type="dc:Point" x="453" y="313" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="435.5" y="292" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1w1j8ao_di" bpmnElement="Task_11sf5id">
- <dc:Bounds x="318" y="273" width="100" height="80" />
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceV2.bpmn
deleted file mode 100644
index e8dbc8c7f6..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstanceV2.bpmn
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2">
- <bpmn:process id="DoCreateServiceInstanceV2" name="DoCreateServiceInstanceV2" isExecutable="true">
- <bpmn:startEvent id="StartEvent_1" name="Start">
- <bpmn:outgoing>SequenceFlow_0g8qp84</bpmn:outgoing>
- </bpmn:startEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0651nnp" sourceRef="ScriptTask_1" targetRef="ScriptTask_2" />
- <bpmn:sequenceFlow id="SequenceFlow_0u0ptz7" sourceRef="ScriptTask_2" targetRef="ScriptTask_3" />
- <bpmn:exclusiveGateway id="ExclusiveGateway_1" name="Run SDNC Request?">
- <bpmn:incoming>SequenceFlow_0ekno6w</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1t50vt9</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_0xhy3o1</bpmn:outgoing>
- </bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0ekno6w" sourceRef="ScriptTask_3" targetRef="ExclusiveGateway_1" />
- <bpmn:sequenceFlow id="SequenceFlow_1t50vt9" name="Yes" sourceRef="ExclusiveGateway_1" targetRef="ScriptTask_4">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("callSDNC")}]]></bpmn:conditionExpression>
- </bpmn:sequenceFlow>
- <bpmn:endEvent id="EndEvent_2" name="End">
- <bpmn:incoming>SequenceFlow_0xhy3o1</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0xhy3o1" name="No" sourceRef="ExclusiveGateway_1" targetRef="EndEvent_2" />
- <bpmn:endEvent id="EndEvent_1" name="End">
- <bpmn:incoming>SequenceFlow_0eryvle</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0eryvle" sourceRef="ScriptTask_4" targetRef="EndEvent_1" />
- <bpmn:scriptTask id="ScriptTask_1" name="Create Service Instance (A&#38;AI)" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0g8qp84</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0651nnp</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstanceV2()
-dcsi.createServiceInstance(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_2" name="Create Project (A&#38;AI)" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0651nnp</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0u0ptz7</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstanceV2()
-dcsi.createProject(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_3" name="Create Owning Entity (A&#38;AI)" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0u0ptz7</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ekno6w</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstanceV2()
-dcsi.createOwningEntity(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_4" name="Create Service Instance (SDNC)" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1t50vt9</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0eryvle</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstanceV2()
-dcsi.sdncCreateServiceInstance(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- <bpmn:subProcess id="SubProcess_0lezgt7" name="Error Handling" triggeredByEvent="true">
- <bpmn:startEvent id="ErrorEvent_2" name="Error">
- <bpmn:outgoing>SequenceFlow_0mk8fd7</bpmn:outgoing>
- <bpmn:errorEventDefinition />
- </bpmn:startEvent>
- <bpmn:endEvent id="EndEvent_3" name="End">
- <bpmn:incoming>SequenceFlow_14mdxgk</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_0mk8fd7" sourceRef="ErrorEvent_2" targetRef="SubTask_1" />
- <bpmn:sequenceFlow id="SequenceFlow_14mdxgk" sourceRef="SubTask_1" targetRef="EndEvent_3" />
- <bpmn:callActivity id="SubTask_1" name="DoCreate Rollback" calledElement="DoCreateServiceInstanceRollbackV2">
- <bpmn:extensionElements>
- <camunda:in source="sdncRollback" target="sdncRollback" />
- <camunda:in source="aaiServiceInstanceRollback" target="aaiServiceInstanceRollback" />
- <camunda:in source="ServiceDecomposition" target="ServiceDecomposition" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_0mk8fd7</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_14mdxgk</bpmn:outgoing>
- </bpmn:callActivity>
- </bpmn:subProcess>
- <bpmn:sequenceFlow id="SequenceFlow_0g8qp84" sourceRef="StartEvent_1" targetRef="ScriptTask_1" />
- </bpmn:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateServiceInstanceV2">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
- <dc:Bounds x="166" y="102" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="173" y="138" width="23" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0651nnp_di" bpmnElement="SequenceFlow_0651nnp">
- <di:waypoint xsi:type="dc:Point" x="371" y="120" />
- <di:waypoint xsi:type="dc:Point" x="442" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="406.5" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0u0ptz7_di" bpmnElement="SequenceFlow_0u0ptz7">
- <di:waypoint xsi:type="dc:Point" x="542" y="120" />
- <di:waypoint xsi:type="dc:Point" x="620" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="581" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1hnvq9n_di" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
- <dc:Bounds x="784" y="95" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="773" y="67" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ekno6w_di" bpmnElement="SequenceFlow_0ekno6w">
- <di:waypoint xsi:type="dc:Point" x="720" y="120" />
- <di:waypoint xsi:type="dc:Point" x="784" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="752" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1t50vt9_di" bpmnElement="SequenceFlow_1t50vt9">
- <di:waypoint xsi:type="dc:Point" x="834" y="120" />
- <di:waypoint xsi:type="dc:Point" x="911" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="856" y="94" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_1tlnfr4_di" bpmnElement="EndEvent_2">
- <dc:Bounds x="791" y="196" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="800" y="236" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0xhy3o1_di" bpmnElement="SequenceFlow_0xhy3o1">
- <di:waypoint xsi:type="dc:Point" x="809" y="145" />
- <di:waypoint xsi:type="dc:Point" x="809" y="196" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="815" y="165" width="18" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_015y2ht_di" bpmnElement="EndEvent_1">
- <dc:Bounds x="1078" y="102" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1087" y="142" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0eryvle_di" bpmnElement="SequenceFlow_0eryvle">
- <di:waypoint xsi:type="dc:Point" x="1011" y="120" />
- <di:waypoint xsi:type="dc:Point" x="1078" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1044.5" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1qtzumy_di" bpmnElement="ScriptTask_1">
- <dc:Bounds x="271" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_10octqt_di" bpmnElement="ScriptTask_2">
- <dc:Bounds x="442" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_140drj4_di" bpmnElement="ScriptTask_3">
- <dc:Bounds x="620" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1q37c16_di" bpmnElement="ScriptTask_4">
- <dc:Bounds x="911" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="SubProcess_1p4inl6_di" bpmnElement="SubProcess_0lezgt7" isExpanded="true">
- <dc:Bounds x="368" y="268" width="350" height="200" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StartEvent_0g6sxcc_di" bpmnElement="ErrorEvent_2">
- <dc:Bounds x="409" y="335" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="415" y="375" width="25" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_061qhx5_di" bpmnElement="EndEvent_3">
- <dc:Bounds x="623" y="335" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="632" y="375" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0g8qp84_di" bpmnElement="SequenceFlow_0g8qp84">
- <di:waypoint xsi:type="dc:Point" x="202" y="120" />
- <di:waypoint xsi:type="dc:Point" x="271" y="120" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="191.5" y="99" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0mk8fd7_di" bpmnElement="SequenceFlow_0mk8fd7">
- <di:waypoint xsi:type="dc:Point" x="445" y="353" />
- <di:waypoint xsi:type="dc:Point" x="482" y="353" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="463.5" y="332" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_14mdxgk_di" bpmnElement="SequenceFlow_14mdxgk">
- <di:waypoint xsi:type="dc:Point" x="582" y="353" />
- <di:waypoint xsi:type="dc:Point" x="623" y="353" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="602.5" y="332" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1jzchuz_di" bpmnElement="SubTask_1">
- <dc:Bounds x="482" y="313" width="100" height="80" />
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
index ac48776c95..26a4112d59 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
@@ -1,5 +1,5 @@
<?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="_FhrCQG2BEeaNdqnn65BT4A" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="_FhrCQG2BEeaNdqnn65BT4A" 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="DoCreateVfModuleVolumeV2" name="DoCreateVfModuleVolumeV2" isExecutable="true">
<bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
@@ -128,26 +128,14 @@ doCreateVfModuleVolumeV2.executeMethod('validateVnfResponse', execution, isDebug
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1qwurc5" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="Task_07psich" />
<bpmn2:sequenceFlow id="SequenceFlow_1gbt2n5" sourceRef="Task_07psich" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm" />
- <bpmn2:callActivity id="Task_1u766ge" name="Call Generic Get Service instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="Task_0qbm5cz" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1wi1cf9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vmbvy8</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="Task_0qbm5cz" name="Validate Get Service Instance Call" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vmbvy8</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1dpt7ul</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
-doCreateVfModuleVolumeV2.executeMethod('validateGetServiceInstanceCall', execution, isDebugLogEnabled)]]></bpmn2:script>
+doCreateVfModuleVolumeV2.executeMethod('getServiceInstance', execution, isDebugLogEnabled)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1wi1cf9" sourceRef="ScriptTask_preProcessRequest" targetRef="Task_1u766ge" />
- <bpmn2:sequenceFlow id="SequenceFlow_1vmbvy8" sourceRef="Task_1u766ge" targetRef="Task_0qbm5cz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1wi1cf9" sourceRef="ScriptTask_preProcessRequest" targetRef="Task_0qbm5cz" />
<bpmn2:sequenceFlow id="SequenceFlow_1dpt7ul" sourceRef="Task_0qbm5cz" targetRef="ScriptTask_callRestAaiCloudRegion" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -330,31 +318,21 @@ doCreateVfModuleVolumeV2.executeMethod('validateGetServiceInstanceCall', executi
<dc:Bounds x="837" y="322" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1u596hd_di" bpmnElement="Task_1u766ge">
- <dc:Bounds x="506" y="106" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1n9cmka_di" bpmnElement="Task_0qbm5cz">
- <dc:Bounds x="640" y="106" width="100" height="80" />
+ <dc:Bounds x="576" y="106" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1wi1cf9_di" bpmnElement="SequenceFlow_1wi1cf9">
<di:waypoint xsi:type="dc:Point" x="469" y="146" />
- <di:waypoint xsi:type="dc:Point" x="506" y="146" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="488" y="121" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1vmbvy8_di" bpmnElement="SequenceFlow_1vmbvy8">
- <di:waypoint xsi:type="dc:Point" x="606" y="146" />
- <di:waypoint xsi:type="dc:Point" x="640" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="146" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="623" y="121" width="0" height="0" />
+ <dc:Bounds x="477.5" y="131" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dpt7ul_di" bpmnElement="SequenceFlow_1dpt7ul">
- <di:waypoint xsi:type="dc:Point" x="740" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="676" y="146" />
<di:waypoint xsi:type="dc:Point" x="768" y="146" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="754" y="121" width="0" height="0" />
+ <dc:Bounds x="677" y="131" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
index dacce53963..a093beae91 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
@@ -13,39 +13,6 @@ DoCreateVnf createVnf = new DoCreateVnf()
createVnf.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="callGetService" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="callGetService" name="Get&#10;&#10;Service&#10;&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="DoCVNF_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CRTVI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:in source="DoCVNF_serviceInstanceName" target="GENGS_serviceInstanceName" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGetService" targetRef="serviceInstanceFound" />
- <bpmn2:exclusiveGateway id="serviceInstanceFound" name="Service Instance Found?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceInstanceFound" targetRef="buildWorkflowException" />
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="ExclusiveGateway_0j73e7c">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true && execution.getVariable("GENGS_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:exclusiveGateway id="vnfExist" name="Vnf Already Exist?" default="vnfExistYes">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>vnfExistYes</bpmn2:outgoing>
@@ -77,10 +44,6 @@ ExceptionUtil exceptionUtil = new ExceptionUtil()
exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist.")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="vnfExistWorkflowException" targetRef="EndEvent_2" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:endEvent id="EndEvent_2">
<bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
<bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_2" />
@@ -200,7 +163,7 @@ DoCreateVnf createVnf = new DoCreateVnf()
createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:exclusiveGateway id="ExclusiveGateway_0j73e7c" name="Vnf-name specified?" default="VnfNameSpecified1">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mvplyi</bpmn2:incoming>
<bpmn2:outgoing>VnfNameNotSpecified1</bpmn2:outgoing>
<bpmn2:outgoing>VnfNameSpecified1</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
@@ -271,6 +234,14 @@ createVnfInfra.validateSDNCResponse(execution, response, "get")]]></bpmn2:script
def doCreateVnf = new DoCreateVnf()
doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
+ <bpmn2:scriptTask id="callGetService" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mvplyi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mvplyi" sourceRef="callGetService" targetRef="ExclusiveGateway_0j73e7c" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -283,67 +254,20 @@ doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
- <dc:Bounds x="216" y="200" width="100" height="80" />
+ <dc:Bounds x="238" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="132" y="240" />
- <di:waypoint xsi:type="dc:Point" x="216" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="238" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="165" y="240" width="6" height="6" />
+ <dc:Bounds x="140" y="222" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
- <di:waypoint xsi:type="dc:Point" x="316" y="240" />
- <di:waypoint xsi:type="dc:Point" x="406" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="361" y="225" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="callGetService">
- <dc:Bounds x="406" y="200" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true">
- <dc:Bounds x="552" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="536" y="267" width="82" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="506" y="240" />
- <di:waypoint xsi:type="dc:Point" x="552" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="529" y="225" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="720" y="115" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="577" y="215" />
- <di:waypoint xsi:type="dc:Point" x="577" y="155" />
- <di:waypoint xsi:type="dc:Point" x="720" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="338" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="580" y="174.4237288135593" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="876" y="137" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="894" y="178" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="820" y="155" />
- <di:waypoint xsi:type="dc:Point" x="876" y="155" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="846" y="155" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_CallActivity_60">
- <di:waypoint xsi:type="dc:Point" x="602" y="240" />
- <di:waypoint xsi:type="dc:Point" x="646" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="614" y="216.01288698145387" width="18" height="12" />
+ <dc:Bounds x="336.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">
@@ -630,6 +554,16 @@ doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
<bpmndi:BPMNShape id="ScriptTask_0aonzix_di" bpmnElement="Task_053tb0h">
<dc:Bounds x="1445" y="515" width="100" height="80" />
</bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_019g8vu_di" bpmnElement="callGetService">
+ <dc:Bounds x="425" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mvplyi_di" bpmnElement="SequenceFlow_1mvplyi">
+ <di:waypoint xsi:type="dc:Point" x="525" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
index 73c21090ea..2e12dd3b96 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -15,13 +15,6 @@ ddsi.preProcessRequest(execution)
<bpmn:endEvent id="EndEvent_1uqzt26">
<bpmn:incoming>SequenceFlow_0e7inkl</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_188ejvu</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0vi0sv6</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.postProcessAAIGET(execution)]]></bpmn:script>
- </bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_01erufg" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0oj2anh</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1ev7z6q</bpmn:incoming>
@@ -49,9 +42,8 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" />
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_06phzgv" />
- <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="CallActivity_076pc2z" />
+ <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="ScriptTask_146jt8v" />
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" />
- <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ScriptTask_146jt8v" />
<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>
@@ -93,7 +85,7 @@ ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
<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>
+ <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ym9otf</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoCustomDeleteE2EServiceInstance()
@@ -122,22 +114,6 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_1j08ko3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_1ym9otf" sourceRef="ScriptTask_146jt8v" targetRef="ServiceTask_00tg69u" />
- <bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
- <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>
@@ -219,9 +195,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="1316" y="831" width="90" height="12" />
</bpmndi:BPMNLabel>
</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="1356" y="513" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -237,9 +210,9 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy">
<di:waypoint xsi:type="dc:Point" x="-419" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-357" y="-17" />
+ <di:waypoint xsi:type="dc:Point" x="-26" y="-17" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-433" y="-38" width="90" height="12" />
+ <dc:Bounds x="-267.5" y="-38" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
@@ -249,13 +222,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="1376" y="685.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6">
- <di:waypoint xsi:type="dc:Point" x="-93" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-26" y="-17" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="-104.5" y="-38" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt">
<dc:Bounds x="360" y="742" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -327,16 +293,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="-6" y="39" width="90" 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:BPMNLabel>
- <dc:Bounds x="-225" y="-38" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0o5bglz_di" bpmnElement="ScriptTask_0o5bglz">
<dc:Bounds x="-26" y="233" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -467,4 +423,4 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
index 3e76f61224..2df19abf68 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
@@ -15,12 +15,12 @@ ddsi.preProcessRequest(execution)
<bpmn:endEvent id="EndEvent_1uqzt26">
<bpmn:incoming>SequenceFlow_06tonva</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_188ejvu</bpmn:incoming>
+ <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_00a3ijv</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
-ddsi.postProcessAAIGET(execution)]]></bpmn:script>
+ddsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_01erufg" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0t5f2dt</bpmn:incoming>
@@ -48,7 +48,7 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" />
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_06phzgv" />
- <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="CallActivity_076pc2z" />
+ <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="ScriptTask_1rtnsh8" />
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="ScriptTask_1vlvb1r" />
<bpmn:scriptTask id="ScriptTask_postProcessVFCDelete" name="Post Process VFC Delete" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1931m8u</bpmn:incoming>
@@ -122,22 +122,6 @@ ddsi.preSDNCResourceDelete(execution, resourceName )]]></bpmn:script>
<bpmn:incoming>SequenceFlow_0akcnw7</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0uc2beq</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_188ejvu" sourceRef="CallActivity_076pc2z" targetRef="ScriptTask_1rtnsh8" />
<bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1d5z35x" name="GoTo Delete SDNC Resource">
<bpmn:incoming>SequenceFlow_1qzxy2i</bpmn:incoming>
<bpmn:linkEventDefinition name="DeleteSDNCResource" />
@@ -430,7 +414,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
- <dc:Bounds x="1055" y="88" width="100" height="80" />
+ <dc:Bounds x="795" y="88" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg">
<dc:Bounds x="286" y="1216" width="100" height="80" />
@@ -447,10 +431,9 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy">
<di:waypoint xsi:type="dc:Point" x="411" y="128" />
- <di:waypoint xsi:type="dc:Point" x="461" y="128" />
- <di:waypoint xsi:type="dc:Point" x="667" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="795" y="128" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="391" y="107" width="90" height="12" />
+ <dc:Bounds x="558" y="107" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
@@ -553,16 +536,6 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
<dc:Bounds x="1055" y="577" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
- <dc:Bounds x="667" y="88" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
- <di:waypoint xsi:type="dc:Point" x="767" y="128" />
- <di:waypoint xsi:type="dc:Point" x="1055" y="128" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="866" y="107" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1gbu8tc_di" bpmnElement="IntermediateThrowEvent_1d5z35x">
<dc:Bounds x="1294" y="376" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -781,10 +754,10 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_00a3ijv_di" bpmnElement="SequenceFlow_00a3ijv">
- <di:waypoint xsi:type="dc:Point" x="1155" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="895" y="128" />
<di:waypoint xsi:type="dc:Point" x="1294" y="128" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1179.5" y="107" width="90" height="12" />
+ <dc:Bounds x="1049.5" y="107" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1fqk4c6_di" bpmnElement="ScriptTask_PrepareServiceResources">
@@ -925,4 +898,4 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
index fae66a7381..d9a93e66d8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
@@ -67,28 +67,14 @@ ddsi.preProcessSDNCDelete(execution)]]></bpmn2:script>
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("sendToSDNC" ) == false }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_1dwch0k" name="yes" sourceRef="ExclusiveGateway_1mrh7us" targetRef="ScriptTask_0xxwbdq" />
- <bpmn2:callActivity id="CallActivity_1s8pf0x" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn2:extensionElements>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jqc16k" sourceRef="preProcessRequest_ScriptTask" targetRef="ScriptTask_02da0lj" />
+ <bpmn2:scriptTask id="ScriptTask_02da0lj" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1jqc16k</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1grea1r</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1jqc16k" sourceRef="preProcessRequest_ScriptTask" targetRef="CallActivity_1s8pf0x" />
- <bpmn2:scriptTask id="ScriptTask_02da0lj" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1grea1r</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1up0j5r</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoDeleteServiceInstance()
-ddsi.postProcessAAIGET(execution)]]></bpmn2:script>
+ddsi.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1grea1r" sourceRef="CallActivity_1s8pf0x" targetRef="ScriptTask_02da0lj" />
<bpmn2:sequenceFlow id="SequenceFlow_1up0j5r" sourceRef="ScriptTask_02da0lj" targetRef="ExclusiveGateway_0590oev" />
<bpmn2:scriptTask id="ScriptTask_1ybdq3e" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0riudmc</bpmn2:incoming>
@@ -250,26 +236,16 @@ ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn2:script>
<dc:Bounds x="306" y="101" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1s8pf0x_di" bpmnElement="CallActivity_1s8pf0x">
- <dc:Bounds x="-121" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1jqc16k_di" bpmnElement="SequenceFlow_1jqc16k">
<di:waypoint xsi:type="dc:Point" x="-165" y="97" />
- <di:waypoint xsi:type="dc:Point" x="-121" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-143" y="82" width="0" height="0" />
+ <dc:Bounds x="-117.5" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_02da0lj_di" bpmnElement="ScriptTask_02da0lj">
<dc:Bounds x="20" y="57" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1grea1r_di" bpmnElement="SequenceFlow_1grea1r">
- <di:waypoint xsi:type="dc:Point" x="-21" y="97" />
- <di:waypoint xsi:type="dc:Point" x="20" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="0" y="82" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1up0j5r_di" bpmnElement="SequenceFlow_1up0j5r">
<di:waypoint xsi:type="dc:Point" x="120" y="97" />
<di:waypoint xsi:type="dc:Point" x="150" y="97" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
index a46d8d4de2..ef3340e887 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<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="DoUpdateE2EServiceInstance" name="DoUpdateE2EServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -113,7 +113,7 @@ ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1demy08</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="UpdateAAI" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1demy08" sourceRef="IntermediateCatchEvent_0a9bdjw" targetRef="ScriptTask_195nptq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1demy08" sourceRef="IntermediateCatchEvent_0a9bdjw" targetRef="ScriptTask_0sis7k0" />
<bpmn2:sequenceFlow id="SequenceFlow_0f76thv" sourceRef="CallActivity_1nm9zq7" targetRef="ScriptTask_0xtabf8" />
<bpmn2:scriptTask id="ScriptTask_19v8l1w" name="Post Config Service Instance Update" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0ku36oy</bpmn2:incoming>
@@ -173,40 +173,8 @@ dcsi.postProcessRollback(execution)
<bpmn2:sequenceFlow id="SequenceFlow_02znk15" sourceRef="ScriptTask_0vc9jgo" targetRef="EndEvent_014jyvb" />
<bpmn2:sequenceFlow id="SequenceFlow_19ly8h7" sourceRef="ScriptTask_1awrp72" targetRef="ScriptTask_0vc9jgo" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_195nptq" name="Pre Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1demy08</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1cy5gq2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstance()
-dcsi.preProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1cy5gq2" sourceRef="ScriptTask_195nptq" targetRef="CallActivity_069o6fn" />
- <bpmn2:callActivity id="CallActivity_069o6fn" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1cy5gq2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vy856f</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_0lp9y03" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vy856f</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14ggluy</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1vy856f" sourceRef="CallActivity_069o6fn" targetRef="ScriptTask_0lp9y03" />
- <bpmn2:sequenceFlow id="SequenceFlow_14ggluy" sourceRef="ScriptTask_0lp9y03" targetRef="ScriptTask_0sis7k0" />
<bpmn2:scriptTask id="ScriptTask_0sis7k0" name="Pre Process AAI PUT" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_14ggluy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1demy08</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1kx5ke9</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoUpdateE2EServiceInstance()
@@ -387,11 +355,9 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1demy08_di" bpmnElement="SequenceFlow_1demy08">
<di:waypoint xsi:type="dc:Point" x="110" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="197" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="197" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="293" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="978" y="1373" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="212" y="1367" width="0" height="12" />
+ <dc:Bounds x="499" y="1352" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0f76thv_di" bpmnElement="SequenceFlow_0f76thv">
@@ -504,36 +470,6 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
<dc:Bounds x="907.5" y="1892" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_195nptq_di" bpmnElement="ScriptTask_195nptq">
- <dc:Bounds x="293" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1cy5gq2_di" bpmnElement="SequenceFlow_1cy5gq2">
- <di:waypoint xsi:type="dc:Point" x="393" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="495" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="399" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_069o6fn_di" bpmnElement="CallActivity_069o6fn">
- <dc:Bounds x="495" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0lp9y03_di" bpmnElement="ScriptTask_0lp9y03">
- <dc:Bounds x="724" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1vy856f_di" bpmnElement="SequenceFlow_1vy856f">
- <di:waypoint xsi:type="dc:Point" x="595" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="724" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="614.5" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_14ggluy_di" bpmnElement="SequenceFlow_14ggluy">
- <di:waypoint xsi:type="dc:Point" x="824" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="978" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="856" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0sis7k0_di" bpmnElement="ScriptTask_0sis7k0">
<dc:Bounds x="978" y="1333" width="100" height="80" />
</bpmndi:BPMNShape>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
index 1589633e59..b53e87d34a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
@@ -184,7 +184,7 @@ csi.postProcessForAddResource(execution)]]></bpmn2:script>
<bpmn2:linkEventDefinition name="UpdateAAI" />
</bpmn2:intermediateCatchEvent>
<bpmn2:scriptTask id="ScriptTask_0gj4dj5" name="Pre Process AAI PUT" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1ixphei</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1a65s3k</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1lppnhy</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoUpdateE2EServiceInstanceRollback()
@@ -212,7 +212,7 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
def dcsi = new DoUpdateE2EServiceInstanceRollback()
dcsi.postProcessAAIPUT(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1a65s3k" sourceRef="IntermediateCatchEvent_0546q5i" targetRef="ScriptTask_13h2onn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a65s3k" sourceRef="IntermediateCatchEvent_0546q5i" targetRef="ScriptTask_0gj4dj5" />
<bpmn2:sequenceFlow id="SequenceFlow_1lppnhy" sourceRef="ScriptTask_0gj4dj5" targetRef="CallActivity_0zs5y0x" />
<bpmn2:sequenceFlow id="SequenceFlow_0kbisn8" sourceRef="CallActivity_0zs5y0x" targetRef="ScriptTask_1p96syr" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_1k16vgh" name="RollBackAAI?" default="SequenceFlow_161uzhj">
@@ -287,38 +287,6 @@ rbk.postProcessRequest(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1n6foyw" sourceRef="ScriptTask_17k4l6y" targetRef="EndEvent_193e9tt" />
<bpmn2:sequenceFlow id="SequenceFlow_1azhgda" sourceRef="ScriptTask_1p96syr" targetRef="ScriptTask_17k4l6y" />
<bpmn2:sequenceFlow id="SequenceFlow_055b52t" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="ExclusiveGateway_0ybxh3b" />
- <bpmn2:scriptTask id="ScriptTask_13h2onn" name="Pre Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1a65s3k</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0870pzc</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstanceRollback()
-dcsi.preProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_1527zgc" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0870pzc</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1f31l5s</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_0870pzc" sourceRef="ScriptTask_13h2onn" targetRef="CallActivity_1527zgc" />
- <bpmn2:scriptTask id="ScriptTask_0td1f55" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1f31l5s</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1ixphei</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstanceRollback()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1f31l5s" sourceRef="CallActivity_1527zgc" targetRef="ScriptTask_0td1f55" />
- <bpmn2:sequenceFlow id="SequenceFlow_1ixphei" sourceRef="ScriptTask_0td1f55" targetRef="ScriptTask_0gj4dj5" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -602,9 +570,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1a65s3k_di" bpmnElement="SequenceFlow_1a65s3k">
<di:waypoint xsi:type="dc:Point" x="192" y="783" />
- <di:waypoint xsi:type="dc:Point" x="234" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="783" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="168" y="762" width="90" height="12" />
+ <dc:Bounds x="394.5" y="762" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1lppnhy_di" bpmnElement="SequenceFlow_1lppnhy">
@@ -764,36 +732,6 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<dc:Bounds x="769" y="106" width="15" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_13h2onn_di" bpmnElement="ScriptTask_13h2onn">
- <dc:Bounds x="234" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1527zgc_di" bpmnElement="CallActivity_1527zgc">
- <dc:Bounds x="391" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0870pzc_di" bpmnElement="SequenceFlow_0870pzc">
- <di:waypoint xsi:type="dc:Point" x="334" y="783" />
- <di:waypoint xsi:type="dc:Point" x="391" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="362.5" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0td1f55_di" bpmnElement="ScriptTask_0td1f55">
- <dc:Bounds x="543" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1f31l5s_di" bpmnElement="SequenceFlow_1f31l5s">
- <di:waypoint xsi:type="dc:Point" x="491" y="783" />
- <di:waypoint xsi:type="dc:Point" x="543" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="517" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ixphei_di" bpmnElement="SequenceFlow_1ixphei">
- <di:waypoint xsi:type="dc:Point" x="643" y="783" />
- <di:waypoint xsi:type="dc:Point" x="687" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
index 306b05cea1..b82b1da951 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2: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="DoUpdateNetworkInstance" name="DoUpdateNetworkInstance" isExecutable="true">
<bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -231,42 +231,14 @@ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask" />
<bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
- <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
DoUpdateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask" />
- <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:exclusiveGateway id="siFoundCheck" name="is SI Found?" default="siFoundNo">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
- <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callRESTQueryNetworkId_ScriptTask">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="UPDNETI_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_serviceInstance" target="UPDNETI_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
- <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="callRESTQueryNetworkId_ScriptTask" />
<bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
@@ -340,6 +312,13 @@ def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
+ <bpmn2:scriptTask id="callGetServiceInstance" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -430,7 +409,7 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<di:waypoint xsi:type="dc:Point" x="572" y="203" />
<di:waypoint xsi:type="dc:Point" x="686" y="203" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="629" y="188" width="0" height="0" />
+ <dc:Bounds x="584" y="188" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
@@ -682,42 +661,16 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<dc:Bounds x="221" y="470" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="686" y="163" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="836" y="177" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="891" y="195" width="79" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="ScriptTask_0e58tta_di" targetElement="_BPMNShape_ScriptTask_133">
<di:waypoint xsi:type="dc:Point" x="786" y="203" />
<di:waypoint xsi:type="dc:Point" x="805" y="203" />
<di:waypoint xsi:type="dc:Point" x="805" y="202" />
- <di:waypoint xsi:type="dc:Point" x="836" y="202" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="799" y="203" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133">
- <di:waypoint xsi:type="dc:Point" x="861" y="177" />
+ <di:waypoint xsi:type="dc:Point" x="861" y="202" />
<di:waypoint xsi:type="dc:Point" x="861" y="140" />
<di:waypoint xsi:type="dc:Point" x="910" y="140" />
<di:waypoint xsi:type="dc:Point" x="984" y="140" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="868" y="157" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds x="984" y="256" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
- <di:waypoint xsi:type="dc:Point" x="861" y="227" />
- <di:waypoint xsi:type="dc:Point" x="861" y="296" />
- <di:waypoint xsi:type="dc:Point" x="984" y="296" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="871" y="233" width="22" height="22" />
+ <dc:Bounds x="788" y="184" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245">
@@ -824,6 +777,9 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<di:waypoint xsi:type="dc:Point" x="797" y="946" />
<di:waypoint xsi:type="dc:Point" x="816" y="847" />
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0e58tta_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="686" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java
new file mode 100644
index 0000000000..3f1a5eae07
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so;
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+ entityManagerFactoryRef = "requestEntityManagerFactory",transactionManagerRef = "requestTransactionManager",
+ basePackages = { "org.onap.so.db.request.data.repository"}
+)
+@Profile({"test"})
+public class InfraEmbeddedMariaDbConfig {
+
+ @Primary
+ @Bean(name = "requestEntityManagerFactory")
+ public LocalContainerEntityManagerFactoryBean
+ entityManagerFactory(
+ EntityManagerFactoryBuilder builder,
+ DataSource dataSource
+ ) {
+ return builder
+ .dataSource(dataSource)
+ .packages("org.onap.so.db.request.beans")
+ .persistenceUnit("requestDB")
+ .build();
+ }
+
+ @Bean(name = "requestTransactionManager")
+ public PlatformTransactionManager transactionManager(
+ @Qualifier("requestEntityManagerFactory") EntityManagerFactory
+ entityManagerFactory
+ ) {
+ return new JpaTransactionManager(entityManagerFactory);
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
new file mode 100644
index 0000000000..314cc0b2de
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so;
+
+import java.io.IOException;
+
+import javax.annotation.PreDestroy;
+
+import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
+import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl;
+import org.onap.so.requestsdb.RequestsDBHelper;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScan.Filter;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Profile;
+
+import ch.vorburger.mariadb4j.MariaDB4jService;
+
+@SpringBootApplication
+@Profile("test")
+@EnableProcessApplication("MSO CommonBPMN Test Application")
+@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
+ @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class),
+ @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class),
+ @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) })
+public class TestApplication {
+ public static void main(String... args) {
+ SpringApplication.run(TestApplication.class, args);
+ System.getProperties().setProperty("mso.db", "MARIADB");
+ System.getProperties().setProperty("server.name", "Springboot");
+
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java
new file mode 100644
index 0000000000..0521fa737d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+@ContextConfiguration
+@AutoConfigureWireMock(port = 0)
+public class ValidBPMNTest {
+
+ @Test
+ public void verifyApplicationStartup(){
+ //Verifys Springboot app can start up and all BPMN's are in fact parsable
+ assert(true);
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
new file mode 100644
index 0000000000..8a5ade6fb6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
@@ -0,0 +1,208 @@
+aai:
+ auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+ endpoint: http://localhost:${wiremock.server.port}
+appc:
+ client:
+ key: iaEMAfjsVsZnraBP
+ response:
+ timeout: '120000'
+ secret: wcivUjsjXzmGFBfxMmyJu9dz
+ poolMembers: localhost:3904
+ service: ueb
+ topic:
+ read:
+ name: APPC-TEST-AMDOCS2
+ timeout: '120000'
+ write: APPC-TEST-AMDOCS1-DEV3
+ sdnc:
+ read: SDNC-LCM-READ
+ write: SDNC-LCM-WRITE
+mso:
+ adapters:
+ completemsoprocess:
+ endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess
+ db:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+ spring:
+ endpoint: http://localhost:${wiremock.server.port}
+ network:
+ endpoint: http://localhost:${wiremock.server.port}/networks/NetworkAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/networks/rest/v1/networks
+ openecomp:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+ po:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: 3141634BF7E070AA289CF2892C986C0B
+ sdnc:
+ endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter/v1/sdnc
+ timeout: PT60S
+ tenant:
+ endpoint: http://localhost:${wiremock.server.port}/tenantAdapterMock
+ vnf:
+ endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/vnfs
+ volume-groups:
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/volume-groups
+ vnf-async:
+ endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapterAsync
+ workflow:
+ message:
+ endpoint: http://localhost:${wiremock.server.port}/workflows/messages/message
+
+ async:
+ core-pool-size: 50
+ max-pool-size: 50
+ queue-capacity: 500
+
+ bpmn:
+ optimisticlockingexception:
+ retrycount: '3'
+ callbackRetryAttempts: '5'
+ catalog:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/
+ spring:
+ endpoint: http://localhost:${wiremock.server.port}
+ correlation:
+ timeout: 60
+ db:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ default:
+ adapter:
+ namespace: http://org.onap.so
+ healthcheck:
+ log:
+ debug: 'false'
+ infra:
+ customer:
+ id: testCustIdInfra
+ logPath: logs
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+ po:
+ timeout: PT60S
+ request:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/
+ rollback: 'true'
+ sdnc:
+ password: 3141634BF7E070AA289CF2892C986C0B
+ site-name: localDevEnv
+ workflow:
+ default:
+ aai:
+ cloud-region:
+ version: '9'
+ generic-vnf:
+ version: '9'
+ v8:
+ customer:
+ uri: /aai/v8/business/customers/customer
+ generic-query:
+ uri: /aai/v8/search/generic-query
+ l3-network:
+ uri: /aai/v8/network/l3-networks/l3-network
+ network-policy:
+ uri: /aai/v8/network/network-policies/network-policy
+ nodes-query:
+ uri: /aai/v8/search/nodes-query
+ route-table-reference:
+ uri: /aai/v8/network/route-table-references/route-table-reference
+ tenant:
+ uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+ vce:
+ uri: /aai/v8/network/vces/vce
+ vpn-binding:
+ uri: /aai/v8/network/vpn-bindings/vpn-binding
+ v9:
+ cloud-region:
+ uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+ generic-vnf:
+ uri: /aai/v9/network/generic-vnfs/generic-vnf
+ global:
+ default:
+ aai:
+ namespace: http://org.openecomp.aai.inventory/
+ version: '8'
+ message:
+ endpoint: http://localhost:${wiremock.server.port}/mso/WorkflowMesssage
+ notification:
+ name: GenericNotificationService
+ sdncadapter:
+ callback: http://localhost:${wiremock.server.port}/mso/SDNCAdapterCallbackService
+ vnfadapter:
+ create:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ delete:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ query:
+ callback: http://localhost:${wiremock.server.port}/mso/services/VNFAdapterQuerCallbackV1
+ rollback:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ global:
+ dmaap:
+ username: dmaapUsername
+ password: dmaapPassword
+ host: http://localhost:28090
+ publisher:
+ topic: com.att.mso.asyncStatusUpdate
+ service-plugin:
+ third-sp-endpoint:
+ oof-calc-endpoint:
+policy:
+ auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+ client:
+ auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+ endpoint: https://localhost:8081/pdp/api/
+ environment: TEST
+sniro:
+ conductor:
+ enabled: true
+ host: http://localhost:${wiremock.server.port}
+ uri: /v1/release-orders
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ manager:
+ timeout: PT30M
+ host: http://localhost:${wiremock.server.port}
+ uri.v1: /sniro/api/v2/placement
+ uri.v2: /sniro/api/placement/v2
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ headers.patchVersion: 1
+ headers.minorVersion: 1
+ headers.latestVersion: 2
+spring:
+ datasource:
+ url: jdbc:mariadb://localhost:3307/camundabpmn
+ username: root
+ password: password
+ driver-class-name: org.mariadb.jdbc.Driver
+ initialize: true
+ jpa:
+ generate-ddl: false
+ show-sql: false
+ hibernate:
+ ddl-auto: none
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+ enable-lazy-load-no-trans: true
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+ security:
+ usercredentials:
+ -
+ username: test
+ password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+ role: BPEL-Client
+mariaDB4j:
+ dataDir:
+ port: 3307
+ databaseName: camundabpmn
+camunda:
+ bpm:
+ metrics:
+ enabled: false
+ db-reporter-activate: false \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml
deleted file mode 100644
index ebefee7b08..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/applicationContext_forPnfTesting.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-2.5.xsd" >
-
- <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
- <property name="targetDataSource">
- <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.h2.Driver" />
- <property name="url"
- value="jdbc:h2:mem:process-engine;DB_CLOSE_DELAY=1000" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </bean>
- </property>
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource" />
- </bean>
-
- <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
- <property name="processEngineName" value="engine" />
- <property name="dataSource" ref="dataSource" />
- <property name="transactionManager" ref="transactionManager" />
- <property name="databaseSchemaUpdate" value="true" />
- <property name="jobExecutorActivate" value="false" />
- <!--<property name="deploymentResources" value="classpath*:*.bpmn" />-->
- </bean>
-
- <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
- <property name="processEngineConfiguration" ref="processEngineConfiguration" />
- </bean>
-
- <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
- <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
- <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
- <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
- <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
-
- <context:annotation-config />
-
- <bean id="processEngineRule" class="org.camunda.bpm.engine.test.ProcessEngineRule">
- <property name="processEngine" ref="processEngine" />
- </bean>
-
- <bean id="aaiConnection" class="org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl"/>
-
- <bean id="checkAaiForCorrelationIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CheckAaiForCorrelationIdDelegate">
- <property name="aaiConnection" ref="aaiConnection"/>
- </bean>
-
- <bean id="createAaiEntryWithPnfIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CreateAaiEntryWithPnfIdDelegate">
- <property name="aaiConnection" ref="aaiConnection"/>
- </bean>
-
- <bean id="informDmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.InformDmaapClient">
- <property name="dmaapClient" ref="dmaapClient"/>
- </bean>
-
- <bean id="dmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl"/>
-</beans>
diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml
index 68f7e5a3bb..3483aed8a7 100644
--- a/bpmn/so-bpmn-tasks/pom.xml
+++ b/bpmn/so-bpmn-tasks/pom.xml
@@ -30,6 +30,12 @@
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-client</artifactId>
<version>1.4.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index 074652e221..9c1fba62e9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -141,6 +141,19 @@ public class AAIUpdateTasks {
}
}
+ public void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution) {
+ try {
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+
+ VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID));
+ CloudRegion cloudRegion = gBBInput.getCloudRegion();
+
+ aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
public void updateOrchestrationStatusAssignedVfModule(BuildingBlockExecution execution) {
try {
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID));
@@ -281,6 +294,16 @@ public class AAIUpdateTasks {
}
}
+ public void updateHeatStackIdVfModule(BuildingBlockExecution execution) {
+ try {
+ VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID));
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+ aaiVfModuleResources.updateHeatStackIdVfModule(vfModule, vnf);
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
/**
* BPMN access method to update L3Network after it was created in AIC
* @param execution
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
index 69fc633bbd..3456fa1c56 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
@@ -92,13 +92,18 @@ public class VnfAdapterCreateTasks {
ServiceInstance serviceInstance = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0);
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID));
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+ VolumeGroup volumeGroup = null;
+ try {
+ volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID));
+ } catch(BBObjectNotFoundException bbException) {
+ }
CloudRegion cloudRegion = gBBInput.getCloudRegion();
RequestContext requestContext = gBBInput.getRequestContext();
OrchestrationContext orchestrationContext = gBBInput.getOrchContext();
String sdncVfModuleQueryResponse = execution.getVariable("SDNCQueryResponse_" + vfModule.getVfModuleId());
String sdncVnfQueryResponse = execution.getVariable("SDNCQueryResponse_" + genericVnf.getVnfId());
- CreateVfModuleRequest createVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ CreateVfModuleRequest createVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
execution.setVariable(VNFREST_REQUEST, createVfModuleRequest.toXmlString());
} catch (Exception ex) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
index aa865f0340..0b712452fd 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
@@ -96,6 +96,7 @@ public class VnfAdapterImpl {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "HeatStackId is missing from create VolumeGroup Vnf Adapter response.");
}
}
+ execution.setVariable("generalBuildingBlock", execution.getGeneralBuildingBlock());
}
} catch (Exception ex) {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
index f94b967643..c45a47bc12 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
@@ -23,8 +23,12 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
import java.util.Optional;
import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.aai.entities.AAIResultWrapper;
import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.client.orchestration.AAINetworkResources;
import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -42,6 +46,12 @@ public class UnassignNetworkBB {
@Autowired
private NetworkBBUtils networkBBUtils;
+
+ @Autowired
+ private ExtractPojosForBB extractPojosForBB;
+
+ @Autowired
+ private AAINetworkResources aaiNetworkResources;
/**
* BPMN access method to prepare overall error messages.
@@ -54,9 +64,11 @@ public class UnassignNetworkBB {
public void checkRelationshipRelatedTo(BuildingBlockExecution execution, String relatedToValue) throws Exception {
try {
- AAIResultWrapper aaiResultWrapper = execution.getVariable("l3NetworkAAIResultWrapper");
- Optional<org.onap.aai.domain.yang.L3Network> l3network = aaiResultWrapper.asBean(org.onap.aai.domain.yang.L3Network.class);
- if (networkBBUtils.isRelationshipRelatedToExists(l3network, relatedToValue)) {
+ L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,
+ execution.getLookupMap().get(ResourceKey.NETWORK_ID));
+ AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network);
+ Optional<org.onap.aai.domain.yang.L3Network> network = aaiResultWrapper.asBean(org.onap.aai.domain.yang.L3Network.class);
+ if (networkBBUtils.isRelationshipRelatedToExists(network, relatedToValue)) {
String msg = MESSAGE_CANNOT_PERFORM_UNASSIGN + relatedToValue;
execution.setVariable("ErrorUnassignNetworkBB", msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
index fd5f00ed6f..6fcad95144 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java
@@ -26,6 +26,7 @@ public class Resource {
private WorkflowType resourceType;
private boolean generated;
private boolean baseVfModule;
+ private String virtualLinkKey;
public Resource(WorkflowType resourceType, String resourceId, boolean generated){
this.resourceId = resourceId;
@@ -57,4 +58,10 @@ public class Resource {
public void setBaseVfModule(boolean baseVfModule) {
this.baseVfModule = baseVfModule;
}
+ public String getVirtualLinkKey() {
+ return virtualLinkKey;
+ }
+ public void setVirtualLinkKey(String virtualLinkKey) {
+ this.virtualLinkKey = virtualLinkKey;
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 0f02928d16..c6a63e1431 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -45,6 +45,7 @@ import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.InstanceGroup;
@@ -159,7 +160,7 @@ public class WorkflowAction {
}
for (OrchestrationFlow orchFlow : orchFlows) {
ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, key, apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false);
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null);
flowsToExecute.add(ebb);
}
} else {
@@ -264,6 +265,7 @@ public class WorkflowAction {
execution.setVariable("flowsToExecute", flowsToExecute);
} catch (Exception ex) {
+ msoLogger.error(ex);
buildAndThrowException(execution, "Exception in create execution list " + ex.getMessage(), ex);
}
}
@@ -289,7 +291,7 @@ public class WorkflowAction {
Arrays.stream(WorkflowType.values()).filter(type -> !type.equals(WorkflowType.SERVICE)).forEach(type -> {
List<Resource> resources = resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList());
for(int i = 0; i < resources.size(); i++){
- updateWorkflowResourceIds(flowsToExecute, type, resources.get(i).getResourceId(), retrieveAAIResourceId(aaiResourceIds,type));
+ updateWorkflowResourceIds(flowsToExecute, type, resources.get(i).getResourceId(), retrieveAAIResourceId(aaiResourceIds,type), null);
}
});
}
@@ -309,12 +311,13 @@ public class WorkflowAction {
Arrays.stream(WorkflowType.values()).filter(type -> !type.equals(WorkflowType.SERVICE)).forEach(type -> {
List<Resource> resources = resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList());
for(int i = 0; i < resources.size(); i++){
- updateWorkflowResourceIds(flowsToExecute, type, resourceCounter.stream().filter(x -> type.equals(x.getResourceType()))
- .collect(Collectors.toList()).get(i).getResourceId(), null); }
+ Resource resource = resourceCounter.stream().filter(x -> type.equals(x.getResourceType()))
+ .collect(Collectors.toList()).get(i);
+ updateWorkflowResourceIds(flowsToExecute, type, resource.getResourceId(), null, resource.getVirtualLinkKey()); }
});
}
- protected void updateWorkflowResourceIds(List<ExecuteBuildingBlock> flowsToExecute, WorkflowType resource, String key, String id){
+ protected void updateWorkflowResourceIds(List<ExecuteBuildingBlock> flowsToExecute, WorkflowType resource, String key, String id, String virtualLinkKey){
String resourceId = id;
if(resourceId==null){
resourceId = UUID.randomUUID().toString();
@@ -335,6 +338,12 @@ public class WorkflowAction {
}
ebb.setWorkflowResourceIds(workflowResourceIds);
}
+ if(virtualLinkKey != null && ebb.getBuildingBlock().getIsVirtualLink()
+ && virtualLinkKey.equalsIgnoreCase(ebb.getBuildingBlock().getVirtualLinkKey())) {
+ WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+ workflowResourceIds.setNetworkId(resourceId);
+ ebb.setWorkflowResourceIds(workflowResourceIds);
+ }
}
}
@@ -381,18 +390,29 @@ public class WorkflowAction {
InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup();
CollectionResourceInstanceGroupCustomization collectionInstCust = null;
if(!instanceGroup.getCollectionInstanceGroupCustomizations().isEmpty()) {
- collectionInstCust = instanceGroup.getCollectionInstanceGroupCustomizations().get(0);
- if(collectionInstCust.getSubInterfaceNetworkQuantity() != null) {
+ for(CollectionResourceInstanceGroupCustomization collectionInstanceGroupTemp : instanceGroup.getCollectionInstanceGroupCustomizations()) {
+ if(collectionInstanceGroupTemp.getModelCustomizationUUID().equalsIgnoreCase(collectionResourceCustomization.getModelCustomizationUUID())) {
+ collectionInstCust = collectionInstanceGroupTemp;
+ break;
+ }
+ }
+ if(collectionInstCust != null && collectionInstCust.getSubInterfaceNetworkQuantity() != null) {
minNetworks = collectionInstCust.getSubInterfaceNetworkQuantity();
}
}
msoLogger.debug("minNetworks: " + minNetworks);
+ CollectionNetworkResourceCustomization collectionNetworkResourceCust = null;
+ for(CollectionNetworkResourceCustomization collectionNetworkTemp : instanceGroup.getCollectionNetworkResourceCustomizations()) {
+ if(collectionNetworkTemp.getNetworkResourceCustomization().getModelCustomizationUUID().equalsIgnoreCase(collectionResourceCustomization.getModelCustomizationUUID())) {
+ collectionNetworkResourceCust = collectionNetworkTemp;
+ break;
+ }
+ }
for (int i = 0; i < minNetworks; i++) {
- if(collectionInstCust != null) {
-
- resourceCounter.add(
- new Resource(WorkflowType.VIRTUAL_LINK,instanceGroup.getCollectionNetworkResourceCustomizations()
- .get(0).getModelCustomizationUUID(),false));
+ if(collectionNetworkResourceCust != null && collectionInstCust != null) {
+ Resource resource = new Resource(WorkflowType.VIRTUAL_LINK,collectionNetworkResourceCust.getModelCustomizationUUID(),false);
+ resource.setVirtualLinkKey(Integer.toString(i));
+ resourceCounter.add(resource);
}
}
} else {
@@ -633,7 +653,7 @@ public class WorkflowAction {
if (vnf != null && vnf.getVfModules() != null) {
for (org.onap.aai.domain.yang.VfModule vfModule : vnf.getVfModules().getVfModule()) {
Optional<VolumeGroup> volumeGroupFromVfModule = bbInputSetupUtils
- .getRelatedVolumeGroupByNameFromVfModule(vfModule.getVfModuleId(), instanceName);
+ .getRelatedVolumeGroupByNameFromVfModule(vnf.getVnfId(), vfModule.getVfModuleId(), instanceName);
if (volumeGroupFromVfModule.isPresent()) {
return volumeGroupFromVfModule.get().getVolumeGroupId();
}
@@ -642,6 +662,7 @@ public class WorkflowAction {
}
return generatedResourceId;
} catch (Exception ex) {
+ msoLogger.error(ex);
throw new IllegalStateException(
"WorkflowAction was unable to verify if the instance name already exist in AAI.");
}
@@ -666,20 +687,32 @@ public class WorkflowAction {
for (ExecuteBuildingBlock ebb : orchFlows) {
if (ebb.getBuildingBlock().getBpmnFlowName().equals("AssignNetworkBB")) {
String key = ebb.getBuildingBlock().getKey();
+ boolean isVirtualLink = ebb.getBuildingBlock().getIsVirtualLink();
+ String virtualLinkKey = ebb.getBuildingBlock().getVirtualLinkKey();
sortedOrchFlows.add(ebb);
for (ExecuteBuildingBlock ebb2 : orchFlows) {
- if (ebb2.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB")
+ if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB")
&& ebb2.getBuildingBlock().getKey().equalsIgnoreCase(key)) {
sortedOrchFlows.add(ebb2);
break;
}
+ if(isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB")
+ && ebb2.getBuildingBlock().getVirtualLinkKey().equalsIgnoreCase(virtualLinkKey)) {
+ sortedOrchFlows.add(ebb2);
+ break;
+ }
}
for (ExecuteBuildingBlock ebb2 : orchFlows) {
- if (ebb2.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB")
+ if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB")
&& ebb2.getBuildingBlock().getKey().equalsIgnoreCase(key)) {
sortedOrchFlows.add(ebb2);
break;
}
+ if(isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB")
+ && ebb2.getBuildingBlock().getVirtualLinkKey().equalsIgnoreCase(virtualLinkKey)) {
+ sortedOrchFlows.add(ebb2);
+ break;
+ }
}
} else if (ebb.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB")
|| ebb.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB")) {
@@ -729,48 +762,49 @@ public class WorkflowAction {
workflowResourceIds.setServiceInstanceId(resourceId);
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType())
.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
} else if (orchFlow.getFlowName().contains(VNF)) {
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType())
.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
} else if (orchFlow.getFlowName().contains(NETWORK)
&& !orchFlow.getFlowName().contains(NETWORKCOLLECTION)) {
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType())
.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
- flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType())
- .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true));
+ Resource resource = resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType())
+ .collect(Collectors.toList()).get(i);
+ flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource.getResourceId(), apiVersion, resourceId,
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey()));
}
} else if (orchFlow.getFlowName().contains(VFMODULE)) {
List<Resource> vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType())
.collect(Collectors.toList()));
for (int i = 0; i < vfModuleResourcesSorted.size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
} else if (orchFlow.getFlowName().contains(VOLUMEGROUP)) {
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType())
.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
} else if (orchFlow.getFlowName().contains(NETWORKCOLLECTION)) {
for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()).collect(Collectors.toList()).size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType())
.collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
} else {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, "", apiVersion, resourceId,
- requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false));
+ requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null));
}
}
return flowsToExecute;
@@ -778,13 +812,14 @@ public class WorkflowAction {
protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, String key,
String apiVersion, String resourceId, String requestAction, boolean aLaCarte, String vnfType,
- WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink) {
+ WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey) {
ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock();
BuildingBlock buildingBlock = new BuildingBlock();
buildingBlock.setBpmnFlowName(orchFlow.getFlowName());
buildingBlock.setMsoId(UUID.randomUUID().toString());
buildingBlock.setKey(key);
buildingBlock.setIsVirtualLink(isVirtualLink);
+ buildingBlock.setVirtualLinkKey(virtualLinkKey);
executeBuildingBlock.setApiVersion(apiVersion);
executeBuildingBlock.setaLaCarte(aLaCarte);
executeBuildingBlock.setRequestAction(requestAction);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
index 373ed63fda..94dfdcc747 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
@@ -266,6 +266,10 @@ public class AAIObjectMapper {
protected void configure() {
map().setModelInvariantId(source.getModelInfoCollection().getModelInvariantUUID());
map().setModelVersionId(source.getModelInfoCollection().getModelVersionId());
+ map().setCollectionCustomizationId(source.getModelInfoCollection().getModelCustomizationUUID());
+ map().setCollectionFunction(source.getModelInfoCollection().getCollectionFunction());
+ map().setCollectionRole(source.getModelInfoCollection().getCollectionRole());
+ map().setCollectionType(source.getModelInfoCollection().getCollectionType());
map().setCollectionName(source.getName());
}
});
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
index a1501da0e2..ee8f503e42 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
@@ -240,7 +240,7 @@ public class NetworkAdapterObjectMapper {
for (org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet subnet : subnets) {
org.onap.so.openstack.beans.Subnet openstackSubnet = modelMapper.map(subnet, org.onap.so.openstack.beans.Subnet.class);
//update cidr value
- if (subnet.getNetworkStartAddress() != null & subnet.getCidrMask() != null)
+ if (subnet.getNetworkStartAddress() != null && subnet.getCidrMask() != null)
openstackSubnet.setCidr(subnet.getNetworkStartAddress().concat(FORWARD_SLASH).concat(subnet.getCidrMask()));
List<org.onap.so.bpmn.servicedecomposition.bbobjects.HostRoute> hostRouteList = subnet.getHostRoutes();
List<org.onap.so.openstack.beans.HostRoute> openstackHostRouteList = new ArrayList<>();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
index d8dde57135..67e7afb599 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
@@ -20,14 +20,18 @@
package org.onap.so.client.adapter.vnf.mapper;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import javax.annotation.PostConstruct;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology;
import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest;
import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest;
import org.onap.so.bpmn.core.UrnPropertiesReader;
@@ -41,16 +45,19 @@ import org.onap.so.entity.MsoRequest;
import org.springframework.stereotype.Component;
import org.springframework.web.util.UriUtils;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class VnfAdapterObjectMapper {
private ObjectMapper mapper = new ObjectMapper();
+
+ @PostConstruct
+ public void init () {
+ mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ }
public CreateVolumeGroupRequest createVolumeGroupRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf, VolumeGroup volumeGroup, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
CreateVolumeGroupRequest createVolumeGroupRequest = new CreateVolumeGroupRequest();
@@ -101,7 +108,7 @@ public class VnfAdapterObjectMapper {
final String USER_PARAM_NAME_KEY = "name";
final String USER_PARAM_VALUE_KEY = "value";
// sdncVfModuleQueryResponse will not be available in aLaCarte case
- if (sdncVfModuleQueryResponse != null) {
+ if (sdncVfModuleQueryResponse != null) {
GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class);
buildParamsMapFromSdncParams(volumeGroupParams, vfModuleTopology.getVfModuleParameters());
}
@@ -164,4 +171,4 @@ public class VnfAdapterObjectMapper {
return UrnPropertiesReader.getVariable(key);
}
-}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index c4dcd1aed9..515f04b218 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -30,18 +30,7 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
-import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
-import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
-import org.onap.so.entity.MsoRequest;
-import org.onap.so.jsonpath.JsonPathUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
+import javax.annotation.PostConstruct;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
@@ -57,18 +46,37 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataInte
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataNetworkInformationItems;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkInformationItem;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataNetworkinformationitemsNetworkinformationitemNetworkIps;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataSriovParameters;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVmnetworkdataSriovparametersHeatVlanFilters;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmNames;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmNetworks;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmnamesVnfcNames;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfNetworkData;
-import org.onap.sdnc.northbound.client.model.*;
-
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcNetworkData;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcNetworkData;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfresourceassignmentsVnfResourceAssignments;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsAvailabilityZones;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks;
import org.onap.sdnc.northbound.client.model.GenericResourceApiVnftopologyVnfTopology;
+import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
+import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.entity.MsoRequest;
+import org.onap.so.jsonpath.JsonPathUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -96,19 +104,33 @@ public class VnfAdapterVfModuleObjectMapper {
private static final String FLOATING_V6_IP = "_floating_v6_ip";
private static final String UNDERSCORE = "_";
+ @PostConstruct
+ public void init () {
+ mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ }
+
public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
- VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
+ VfModule vfModule, VolumeGroup volumeGroup, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
CreateVfModuleRequest createVfModuleRequest = new CreateVfModuleRequest();
createVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
createVfModuleRequest.setTenantId(cloudRegion.getTenantId());
createVfModuleRequest.setVfModuleId(vfModule.getVfModuleId());
createVfModuleRequest.setVfModuleName(vfModule.getVfModuleName());
- createVfModuleRequest.setVnfType(genericVnf.getVnfType());
+ createVfModuleRequest.setVnfId(genericVnf.getVnfId());
+ createVfModuleRequest.setVnfType(genericVnf.getVnfType());
createVfModuleRequest.setVnfVersion(serviceInstance.getModelInfoServiceInstance().getModelVersion());
createVfModuleRequest.setVfModuleType(vfModule.getModelInfoVfModule().getModelName());
createVfModuleRequest.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID());
-
+ if (volumeGroup != null) {
+ createVfModuleRequest.setVolumeGroupId(volumeGroup.getVolumeGroupId());
+ createVfModuleRequest.setVolumeGroupStackId(volumeGroup.getHeatStackId());
+ }
+ VfModule baseVfModule = getBaseVfModule(genericVnf);
+ if (baseVfModule != null) {
+ createVfModuleRequest.setBaseVfModuleId(baseVfModule.getVfModuleId());
+ createVfModuleRequest.setBaseVfModuleStackId(baseVfModule.getHeatStackId());
+ }
createVfModuleRequest.setVfModuleParams(buildVfModuleParamsMap(requestContext, serviceInstance, genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse));
createVfModuleRequest.setSkipAAI(true);
@@ -134,6 +156,7 @@ public class VnfAdapterVfModuleObjectMapper {
private Map<String,String> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException {
+
GenericResourceApiVnftopologyVnfTopology vnfTopology = mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnftopologyVnfTopology.class);
GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class);
Map<String,String> paramsMap = new HashMap<>();
@@ -151,7 +174,13 @@ public class VnfAdapterVfModuleObjectMapper {
buildMandatoryParamsMap(paramsMap, serviceInstance, genericVnf, vfModule);
// Parameters received from the request should overwrite any parameters received from SDNC
- paramsMap.putAll(requestContext.getUserParams());
+
+ if (requestContext.getUserParams() != null) {
+ paramsMap.putAll(requestContext.getUserParams());
+ }
+ if (vfModule.getCloudParams() != null) {
+ paramsMap.putAll(vfModule.getCloudParams());
+ }
return paramsMap;
}
@@ -161,7 +190,9 @@ public class VnfAdapterVfModuleObjectMapper {
paramsMap.put("vf_module_id", vfModule.getVfModuleId());
paramsMap.put("vf_module_name", vfModule.getVfModuleName());
paramsMap.put("environment_context",serviceInstance.getModelInfoServiceInstance().getEnvironmentContext());
+ paramsMap.putIfAbsent("environment_context", "");
paramsMap.put("workload_context", serviceInstance.getModelInfoServiceInstance().getWorkloadContext());
+ paramsMap.putIfAbsent("workload_context", "");
Integer vfModuleIndex = vfModule.getModuleIndex();
if (vfModuleIndex != null) {
paramsMap.put("vf_module_index", vfModuleIndex.toString());
@@ -348,7 +379,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
private void buildVfModuleSriovParameters(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String networkKey) {
- /** SRIOV Parameters
+ // SRIOV Parameters
GenericResourceApiVmnetworkdataSriovParameters sriovParameters = network.getSriovParameters();
if (sriovParameters != null) {
GenericResourceApiVmnetworkdataSriovparametersHeatVlanFilters heatVlanFilters = sriovParameters.getHeatVlanFilters();
@@ -371,7 +402,7 @@ public class VnfAdapterVfModuleObjectMapper {
}
}
}
- **/
+
}
private void buildVfModuleNetworkInformation(Map<String,String> paramsMap, GenericResourceApiVmNetworkData network, String key, String networkKey) {
@@ -726,4 +757,18 @@ public class VnfAdapterVfModuleObjectMapper {
return json;
}
+
+ private VfModule getBaseVfModule(GenericVnf genericVnf) {
+ List<VfModule> vfModules = genericVnf.getVfModules();
+ VfModule baseVfModule = null;
+ if (vfModules != null) {
+ for(int i = 0; i < vfModules.size(); i++) {
+ if (vfModules.get(i).getModelInfoVfModule().getIsBaseBoolean()) {
+ baseVfModule = vfModules.get(i);
+ break;
+ }
+ }
+ }
+ return baseVfModule;
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
index 7fef56d965..a641d43ba3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVfModuleResources.java
@@ -67,6 +67,15 @@ public class AAIVfModuleResources {
injectionHelper.getAaiClient().update(vfModuleURI, aaiVfModule);
}
+ public void updateHeatStackIdVfModule(VfModule vfModule, GenericVnf vnf) {
+ AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
+ VfModule copiedVfModule = vfModule.shallowCopyId();
+
+ copiedVfModule.setHeatStackId(vfModule.getHeatStackId());
+ org.onap.aai.domain.yang.VfModule aaiVfModule = aaiObjectMapper.mapVfModule(copiedVfModule);
+ injectionHelper.getAaiClient().update(vfModuleURI, aaiVfModule);
+ }
+
public void changeAssignVfModule(VfModule vfModule, GenericVnf vnf) {
AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnf.getVnfId(), vfModule.getVfModuleId());
org.onap.aai.domain.yang.VfModule AAIVfModule = aaiObjectMapper.mapVfModule(vfModule);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
index 70c6724921..af97e55c14 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVolumeGroupResources.java
@@ -74,4 +74,12 @@ public class AAIVolumeGroupResources {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
injectionHelper.getAaiClient().delete(uri);
}
+
+ public void updateHeatStackIdVolumeGroup(VolumeGroup volumeGroup, CloudRegion cloudRegion) {
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+ VolumeGroup copiedVolumeGroup = volumeGroup.shallowCopyId();
+
+ copiedVolumeGroup.setHeatStackId(volumeGroup.getHeatStackId());
+ injectionHelper.getAaiClient().update(uri, aaiObjectMapper.mapVolumeGroup(copiedVolumeGroup));
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
index e52616677d..2d9032c7c0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResources.java
@@ -28,6 +28,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.adapter.vnf.mapper.VnfAdapterVfModuleObjectMapper;
@@ -43,8 +44,8 @@ public class VnfAdapterVfModuleResources {
private VnfAdapterVfModuleObjectMapper vnfAdapterVfModuleObjectMapper;
public CreateVfModuleRequest createVfModuleRequest(RequestContext requestContext, CloudRegion cloudRegion, OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
- VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws IOException {
- return vnfAdapterVfModuleObjectMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ VfModule vfModule, VolumeGroup volumeGroup, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws IOException {
+ return vnfAdapterVfModuleObjectMapper.createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
}
public DeleteVfModuleRequest deleteVfModuleRequest(RequestContext requestContext, CloudRegion cloudRegion,
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java
index 1ce7a92eb5..50137cf985 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java
@@ -20,11 +20,6 @@
package org.onap.so.client.sdnc;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import java.util.Collections;
-
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -32,7 +27,6 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
-import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
@@ -58,25 +52,19 @@ public class BaseClient<I,O> {
this.targetUrl = targetUrl;
}
- public O get(I data, Object... uriVariables) throws RestClientException {
- return run(data, HttpMethod.GET, uriVariables);
+ public O get(I data, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
+ return run(data, HttpMethod.GET, typeRef, uriVariables);
}
- public O post(I data, Object... uriVariables) throws RestClientException {
- return run(data, HttpMethod.POST, uriVariables);
+ public O post(I data, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
+ return run(data, HttpMethod.POST, typeRef, uriVariables);
}
- public O run(I data, HttpMethod method, Object... uriVariables) throws RestClientException {
+ public O run(I data, HttpMethod method, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
HttpEntity<I> requestEntity = new HttpEntity<I>(data, getHttpHeader());
RestTemplate restTemplate = new RestTemplate();
- ObjectMapper mapper = new ObjectMapper();
- MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
- converter.setObjectMapper(mapper);
- mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
- restTemplate.getMessageConverters().add(0, converter);
restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));
- ParameterizedTypeReference<O> output = new ParameterizedTypeReference<O>() {};
- ResponseEntity<O> responseEntity = restTemplate.exchange(getTargetUrl(), method, requestEntity, output,
+ ResponseEntity<O> responseEntity = restTemplate.exchange(getTargetUrl(), method, requestEntity, typeRef,
uriVariables);
return responseEntity.getBody();
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
index 1f0d654a85..9e60196426 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
@@ -21,6 +21,7 @@
package org.onap.so.client.sdnc;
import java.util.LinkedHashMap;
+
import javax.ws.rs.core.UriBuilder;
import org.onap.so.client.exception.BadResponseException;
@@ -29,6 +30,7 @@ import org.onap.so.client.sdnc.beans.SDNCProperties;
import org.onap.so.client.sdnc.endpoint.SDNCTopology;
import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
@@ -58,7 +60,7 @@ public class SDNCClient {
HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth());
STOClient.setHttpHeader(httpHeader);
msoLogger.info("Running SDNC CLIENT for TargetUrl: " + targetUrl);
- LinkedHashMap<?, ?> output = STOClient.post(jsonRequest);
+ LinkedHashMap<?, ?> output = STOClient.post(jsonRequest, new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {});
msoLogger.info("Validating output...");
return sdnCommonTasks.validateSDNResponse(output);
}
@@ -84,7 +86,7 @@ public class SDNCClient {
HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth());
STOClient.setHttpHeader(httpHeader);
msoLogger.info("Running SDNC CLIENT...");
- LinkedHashMap<?, ?> output = STOClient.get(jsonRequest);
+ LinkedHashMap<?, ?> output = STOClient.get(jsonRequest, new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {});
msoLogger.info("Validating output...");
return sdnCommonTasks.validateSDNGetResponse(output);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
index 20c95dd55e..5b23707cb9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/ServiceTopologyOperationMapper.java
@@ -54,7 +54,7 @@ public class ServiceTopologyOperationMapper{
GenericResourceApiServiceinformationServiceInformation servInfo = generalTopologyObjectMapper.buildServiceInformation(serviceInstance, requestContext, customer, true);
GenericResourceApiServicerequestinputServiceRequestInput servReqInfo = new GenericResourceApiServicerequestinputServiceRequestInput();
- servReqInfo.setServiceInstanceName(serviceInstance.getServiceInstanceId());
+ servReqInfo.setServiceInstanceName(serviceInstance.getServiceInstanceName());
servOpInput.setSdncRequestHeader(sdncRequestHeader);
servOpInput.setRequestInformation(reqInfo);
@@ -64,7 +64,7 @@ public class ServiceTopologyOperationMapper{
if(requestContext.getUserParams()!=null){
for (Map.Entry<String, String> entry : requestContext.getUserParams().entrySet()) {
GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput = new GenericResourceApiServicerequestinputServiceRequestInput();
- serviceRequestInput.setServiceInstanceName(serviceInstance.getServiceInstanceId());
+ serviceRequestInput.setServiceInstanceName(serviceInstance.getServiceInstanceName());
GenericResourceApiParam serviceInputParameters = new GenericResourceApiParam();
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
paramItem.setName(entry.getKey());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
index 99256fd507..af670d13d5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
@@ -128,6 +128,15 @@ public class VfModuleTopologyOperationRequestMapper {
}
}
+ if (vfModule.getCloudParams() != null) {
+ for (Map.Entry<String, String> entry : vfModule.getCloudParams().entrySet()) {
+ GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
+ paramItem.setName(entry.getKey());
+ paramItem.setValue(entry.getValue());
+ vfModuleInputParameters.addParamItem(paramItem);
+ }
+ }
+
if (volumeGroup != null) {
GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam();
paramItem.setName("volume-group-id");
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
index 979b9e5e80..cee94e28bd 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
@@ -31,6 +31,7 @@ import org.onap.so.client.sniro.beans.SniroConductorRequest;
import org.onap.so.client.sniro.beans.SniroManagerRequest;
import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
@@ -76,7 +77,7 @@ public class SniroClient {
baseClient.setTargetUrl(url);
baseClient.setHttpHeader(header);
- LinkedHashMap<?, ?> response = baseClient.post(homingRequest.toJsonString());
+ LinkedHashMap<?, ?> response = baseClient.post(homingRequest.toJsonString(), new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {});
validator.validateDemandsResponse(response);
log.trace("Completed Sniro Client Post Demands");
}
@@ -106,7 +107,7 @@ public class SniroClient {
baseClient.setTargetUrl(url);
baseClient.setHttpHeader(header);
- LinkedHashMap<?, ?> response = baseClient.post(releaseRequest.toJsonString());
+ LinkedHashMap<?, ?> response = baseClient.post(releaseRequest.toJsonString(), new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {});
SniroValidator v = new SniroValidator();
v.validateReleaseResponse(response);
log.trace("Completed Sniro Client Post Release");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
index 6ad263a935..c9433a6212 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
@@ -203,6 +203,24 @@ public class AAIUpdateTasksTest extends BaseTaskTest{
}
@Test
+ public void updateHeatStackIdVfModuleTest() throws Exception {
+ doNothing().when(aaiVfModuleResources).updateHeatStackIdVfModule(vfModule, genericVnf);
+
+ aaiUpdateTasks.updateHeatStackIdVfModule(execution);
+
+ verify(aaiVfModuleResources, times(1)).updateHeatStackIdVfModule(vfModule, genericVnf);
+ }
+
+ @Test
+ public void updateHeatStackIdVfModuleExceptionTest() throws Exception {
+ doThrow(Exception.class).when(aaiVfModuleResources).updateHeatStackIdVfModule(vfModule, genericVnf);
+
+ expectedException.expect(BpmnError.class);
+
+ aaiUpdateTasks.updateHeatStackIdVfModule(execution);
+ }
+
+ @Test
public void updateOrchestrationStatusActiveVolumeGroupTest() throws Exception {
doNothing().when(aaiVolumeGroupResources).updateOrchestrationStatusVolumeGroup(volumeGroup, cloudRegion, OrchestrationStatus.ACTIVE);
@@ -249,7 +267,23 @@ public class AAIUpdateTasksTest extends BaseTaskTest{
expectedException.expect(BpmnError.class);
doThrow(Exception.class).when(aaiVolumeGroupResources).updateOrchestrationStatusVolumeGroup(volumeGroup, cloudRegion, OrchestrationStatus.ASSIGNED);
aaiUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(execution);
- }
+ }
+ @Test
+ public void updateHeatStackIdVolumeGroupTest() throws Exception {
+ doNothing().when(aaiVolumeGroupResources).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
+
+ aaiUpdateTasks.updateHeatStackIdVolumeGroup(execution);
+
+ verify(aaiVolumeGroupResources, times(1)).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
+ }
+
+ @Test
+ public void updateHeatStackIdVolumeGroupExceptionTest() throws Exception {
+ expectedException.expect(BpmnError.class);
+ doThrow(Exception.class).when(aaiVolumeGroupResources).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
+ aaiUpdateTasks.updateHeatStackIdVolumeGroup(execution);
+ }
+
@Test
public void updateOstatusAssignedNetworkTest() throws Exception {
doNothing().when(aaiNetworkResources).updateNetwork(network);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
index f54e3faf1d..698ebb33f2 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasksTest.java
@@ -138,12 +138,52 @@ public class VnfAdapterCreateTasksTest extends BaseTaskTest{
execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), sdncVnfQueryResponse);
doReturn(createVfModuleRequest).when(vnfAdapterVfModuleResources).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
vnfAdapterCreateTasks.createVfModule(execution);
verify(vnfAdapterVfModuleResources, times(1)).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ assertEquals(execution.getVariable("VNFREST_Request"), createVfModuleRequest.toXmlString());
+ }
+
+ @Test
+ public void test_createVfModuleWithVolumeGroup() throws Exception {
+ RequestContext requestContext = setRequestContext();
+
+ ServiceInstance serviceInstance = setServiceInstance();
+
+ GenericVnf genericVnf = setGenericVnf();
+
+ VfModule vfModule = setVfModule();
+
+ VolumeGroup volumeGroup = setVolumeGroup();
+
+ CloudRegion cloudRegion = setCloudRegion();
+
+ OrchestrationContext orchestrationContext = setOrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(true);
+
+ CreateVfModuleRequest modRequest = new CreateVfModuleRequest();
+ modRequest.setVfModuleId(vfModule.getVfModuleId());
+ modRequest.setBaseVfModuleStackId("baseVfModuleStackId");
+ modRequest.setVfModuleName(vfModule.getVfModuleName());
+ CreateVfModuleRequest createVfModuleRequest = modRequest;
+
+ String sdncVfModuleQueryResponse = "{someJson}";
+ execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), sdncVfModuleQueryResponse);
+
+ String sdncVnfQueryResponse = "{someJson}";
+ execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), sdncVnfQueryResponse);
+
+ doReturn(createVfModuleRequest).when(vnfAdapterVfModuleResources).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ vnfAdapterCreateTasks.createVfModule(execution);
+
+ verify(vnfAdapterVfModuleResources, times(1)).createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
assertEquals(execution.getVariable("VNFREST_Request"), createVfModuleRequest.toXmlString());
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java
index 6a117902ea..32c285b0fe 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBBTest.java
@@ -20,48 +20,58 @@
package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
+import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.doReturn;
import java.nio.file.Files;
import java.nio.file.Paths;
+import java.util.Optional;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.junit.Test;
+import org.mockito.Mock;
import org.onap.so.bpmn.BaseTaskTest;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.aai.entities.AAIResultWrapper;
import org.springframework.beans.factory.annotation.Autowired;
public class UnassignNetworkBBTest extends BaseTaskTest {
+
+ @Mock
+ private NetworkBBUtils networkBBUtils;
+ @Mock
+ private ExtractPojosForBB extractPojosForBB;
@Autowired
private UnassignNetworkBB unassignNetworkBB;
private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/Network/";
+ private L3Network network;
@Test
public void checkRelationshipRelatedToTrueTest() throws Exception {
expectedException.expect(BpmnError.class);
+ network = setL3Network();
+ network.setNetworkId("testNetworkId1");
final String aaiResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "unassignNetworkBB_queryAAIResponse_.json")));
AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(aaiResponse);
- execution.setVariable("l3NetworkAAIResultWrapper", aaiResultWrapper);
-
+ Optional<org.onap.aai.domain.yang.L3Network> l3network = aaiResultWrapper.asBean(org.onap.aai.domain.yang.L3Network.class);
+ doReturn(network).when(extractPojosForBB).extractByKey(execution, ResourceKey.NETWORK_ID, "testNetworkId1");
+ doReturn(aaiResultWrapper).when(aaiNetworkResources).queryNetworkWrapperById(network);
+ doReturn(true).when(networkBBUtils).isRelationshipRelatedToExists(l3network, "vf-module");
unassignNetworkBB.checkRelationshipRelatedTo(execution, "vf-module");
- }
-
- @Test
- public void checkRelationshipRelatedToFalseTest() throws Exception {
- final String aaiResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "unassignNetworkBB_queryAAIResponse_.json")));
- AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(aaiResponse);
- execution.setVariable("l3NetworkAAIResultWrapper", aaiResultWrapper);
-
- unassignNetworkBB.checkRelationshipRelatedTo(execution, "kfc-module");
- //expected result is no exception
+ assertThat(execution.getVariable("ErrorUnassignNetworkBB"), notNullValue());
}
@Test
public void getCloudSdncRegion25Test() throws Exception {
CloudRegion cloudRegion = setCloudRegion();
cloudRegion.setCloudRegionVersion("2.5");
+ doReturn("AAIAIC25").when(networkBBUtils).getCloudRegion(execution, SourceSystem.SDNC);
unassignNetworkBB.getCloudSdncRegion(execution);
assertEquals("AAIAIC25", execution.getVariable("cloudRegionSdnc"));
}
@@ -71,6 +81,7 @@ public class UnassignNetworkBBTest extends BaseTaskTest {
CloudRegion cloudRegion = setCloudRegion();
cloudRegion.setCloudRegionVersion("3.0");
gBBInput.setCloudRegion(cloudRegion);
+ doReturn(cloudRegion.getLcpCloudRegionId()).when(networkBBUtils).getCloudRegion(execution, SourceSystem.SDNC);
unassignNetworkBB.getCloudSdncRegion(execution);
assertEquals(cloudRegion.getLcpCloudRegionId(), execution.getVariable("cloudRegionSdnc"));
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index c910ad19fa..283f8881c7 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -600,12 +600,15 @@ public class WorkflowActionTest extends BaseTaskTest {
instanceGroup.setCollectionNetworkResourceCustomizations(new ArrayList<>());
CollectionNetworkResourceCustomization collectionNetworkResourceCust = new CollectionNetworkResourceCustomization();
collectionNetworkResourceCust.setModelCustomizationUUID("123");
+ collectionNetworkResourceCust.setNetworkResourceCustomization(collectionResourceCustomization);
instanceGroup.getCollectionNetworkResourceCustomizations().add(collectionNetworkResourceCust );
List<CollectionResourceInstanceGroupCustomization> collectionInstanceGroupCustomizations = new ArrayList<>();
CollectionResourceInstanceGroupCustomization collectionInstanceGroupCustomization = new CollectionResourceInstanceGroupCustomization();
+ collectionInstanceGroupCustomization.setModelCustomizationUUID("123");
collectionInstanceGroupCustomization.setSubInterfaceNetworkQuantity(3);
collectionInstanceGroupCustomizations.add(collectionInstanceGroupCustomization);
collectionInstanceGroupCustomization.setInstanceGroup(instanceGroup);
+ collectionInstanceGroupCustomization.setCollectionResourceCust(collectionResourceCustomization);
instanceGroup.setCollectionInstanceGroupCustomizations(collectionInstanceGroupCustomizations);
collectionResource.setInstanceGroup(instanceGroup);
collectionResourceCustomization.setCollectionResource(collectionResource);;
@@ -618,14 +621,32 @@ public class WorkflowActionTest extends BaseTaskTest {
assertEquals(ebbs.get(0).getBuildingBlock().getBpmnFlowName(),"AssignServiceInstanceBB");
assertEquals(ebbs.get(1).getBuildingBlock().getBpmnFlowName(),"CreateNetworkCollectionBB");
assertEquals(ebbs.get(2).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(2).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(3).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(3).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(4).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(4).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(2).getWorkflowResourceIds().getNetworkId() == ebbs.get(3).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(3).getWorkflowResourceIds().getNetworkId() == ebbs.get(4).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(5).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(5).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(6).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(6).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(7).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(7).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(5).getWorkflowResourceIds().getNetworkId() == ebbs.get(6).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(6).getWorkflowResourceIds().getNetworkId() == ebbs.get(7).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(8).getBuildingBlock().getBpmnFlowName(),"AssignNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(8).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(9).getBuildingBlock().getBpmnFlowName(),"CreateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(9).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
assertEquals(ebbs.get(10).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkBB");
+ assertEquals("Network id not empty", !ebbs.get(10).getWorkflowResourceIds().getNetworkId().isEmpty(), true);
+ assertEquals("Network id same for AssignNetworkBB CreateNetworkBB ActivateNetworkBB",
+ ebbs.get(8).getWorkflowResourceIds().getNetworkId() == ebbs.get(9).getWorkflowResourceIds().getNetworkId()
+ && ebbs.get(9).getWorkflowResourceIds().getNetworkId() == ebbs.get(10).getWorkflowResourceIds().getNetworkId(), true);
assertEquals(ebbs.get(11).getBuildingBlock().getBpmnFlowName(),"ActivateNetworkCollectionBB");
assertEquals(ebbs.get(12).getBuildingBlock().getBpmnFlowName(),"ActivateServiceInstanceBB");
}
@@ -1423,7 +1444,7 @@ public class WorkflowActionTest extends BaseTaskTest {
workflowResourceIds.setVnfId("id444");
when(bbSetupUtils.getAAIGenericVnf("id444")).thenReturn(vnf);
- when(bbSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123","111111")).thenReturn(opVolumeGroup);
+ when(bbSetupUtils.getRelatedVolumeGroupByNameFromVfModule("id123", "id123","111111")).thenReturn(opVolumeGroup);
when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("id444","111111")).thenReturn(Optional.empty());
id2 = workflowAction.validateResourceIdInAAI("generatedId123", WorkflowType.VOLUMEGROUP, "111111", reqDetails, workflowResourceIds);
assertEquals("id123",id2);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
index 88f8526f31..6edda44c0a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
@@ -350,11 +350,19 @@ public class AAIObjectMapperTest{
ModelInfoCollection modelInfoCollection = new ModelInfoCollection();
modelInfoCollection.setCollectionFunction("networkCollectionFunction");
modelInfoCollection.setCollectionRole("networkCollectionRole");
+ modelInfoCollection.setCollectionType("networkCollectionType");
+ modelInfoCollection.setModelCustomizationUUID("modelCustomizationUUID");
+ modelInfoCollection.setModelVersionId("modelVersionId");
+ modelInfoCollection.setModelInvariantUUID("modelInvariantUUID");
networkCollection.setModelInfoCollection(modelInfoCollection);
networkCollection.setName("networkCollectionName");
org.onap.aai.domain.yang.Collection expectedCollection = new org.onap.aai.domain.yang.Collection();
expectedCollection.setCollectionId("networkCollectionId");
+ expectedCollection.setCollectionType("networkCollectionType");
+ expectedCollection.setCollectionCustomizationId("modelCustomizationUUID");
+ expectedCollection.setModelVersionId("modelVersionId");
+ expectedCollection.setModelInvariantId("modelInvariantUUID");
expectedCollection.setCollectionFunction("networkCollectionFunction");
expectedCollection.setCollectionRole("networkCollectionRole");
expectedCollection.setCollectionName("networkCollectionName");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
index 13bdfc87a1..b2f01f007f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapperTest.java
@@ -55,7 +55,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.entity.MsoRequest;
public class VnfAdapterObjectMapperTest {
- private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
+ private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/";
@Spy
private VnfAdapterObjectMapper vnfAdapterObjectMapper = new VnfAdapterObjectMapper();
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java
deleted file mode 100644
index b4c73ceb3b..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperIntegrationTest.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.adapter.vnf.mapper;
-
-import static com.shazam.shazamcrest.MatcherAssert.assertThat;
-import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
-import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
-import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
-import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
-import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
-import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
-import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class VnfAdapterVfModuleObjectMapperIntegrationTest {
-
- private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/";
-
- @Test
- @Ignore
- public void createVfModuleRequestMapperTest() throws Exception {
-
- // prepare and set service instance
- ServiceInstance serviceInstance = new ServiceInstance();
- serviceInstance.setServiceInstanceId("serviceInstanceId");
- ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
- modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
- modelInfoServiceInstance.setModelName("serviceModelName");
- modelInfoServiceInstance.setModelUuid("serviceModelUuid");
- modelInfoServiceInstance.setModelVersion("serviceModelVersion");
- modelInfoServiceInstance.setEnvironmentContext("environmentContext");
- modelInfoServiceInstance.setWorkloadContext("workloadContext");
- serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
- //
- RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
- requestContext.setMsoRequestId("requestId");
- requestContext.setUserParams(userParams);
- requestContext.setProductFamilyId("productFamilyId");
-
- GenericVnf vnf = new GenericVnf();
- vnf.setVnfId("vnfId");
- vnf.setVnfType("vnfType");
- vnf.setVnfName("vnfName");
- ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
- modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
- modelInfoGenericVnf.setModelName("vnfModelName");
- modelInfoGenericVnf.setModelVersion("vnfModelVersion");
- modelInfoGenericVnf.setModelUuid("vnfModelUuid");
- modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
- vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
-
- Integer vfModuleIndex = 1;
- VfModule vfModule = new VfModule();
- vfModule.setVfModuleId("vfModuleId");
- vfModule.setVfModuleName("vfModuleName");
- vfModule.setModuleIndex(vfModuleIndex);
- ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
- modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
- modelInfoVfModule.setModelName("vfModuleModelName");
- modelInfoVfModule.setModelVersion("vfModuleModelVersion");
- modelInfoVfModule.setModelUUID("vfModuleModelUuid");
- modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
- vfModule.setModelInfoVfModule(modelInfoVfModule);
-
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setLcpCloudRegionId("cloudRegionId");
- cloudRegion.setTenantId("tenantId");
-
- OrchestrationContext orchestrationContext = new OrchestrationContext();
- orchestrationContext.setIsRollbackEnabled(false);
-
- String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
- String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
-
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
- requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
-
-
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequest.json")));
-
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
- jsonToCompare,
- CreateVfModuleRequest.class);
-
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
- }
-
- @Test
- @Ignore
- public void createVfModuleRequestMapperWithCloudResourcesTest() throws Exception {
-
- // prepare and set service instance
- ServiceInstance serviceInstance = new ServiceInstance();
- serviceInstance.setServiceInstanceId("serviceInstanceId");
- ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
- modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
- modelInfoServiceInstance.setModelName("serviceModelName");
- modelInfoServiceInstance.setModelUuid("serviceModelUuid");
- modelInfoServiceInstance.setModelVersion("serviceModelVersion");
- modelInfoServiceInstance.setEnvironmentContext("environmentContext");
- modelInfoServiceInstance.setWorkloadContext("workloadContext");
- serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
- //
- RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
- requestContext.setMsoRequestId("requestId");
- requestContext.setUserParams(userParams);
- requestContext.setProductFamilyId("productFamilyId");
-
- GenericVnf vnf = new GenericVnf();
- vnf.setVnfId("vnfId");
- vnf.setVnfType("vnfType");
- vnf.setVnfName("vnfName");
- ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
- modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
- modelInfoGenericVnf.setModelName("vnfModelName");
- modelInfoGenericVnf.setModelVersion("vnfModelVersion");
- modelInfoGenericVnf.setModelUuid("vnfModelUuid");
- modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
- vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
-
- Integer vfModuleIndex = 1;
- VfModule vfModule = new VfModule();
- vfModule.setVfModuleId("vfModuleId");
- vfModule.setVfModuleName("vfModuleName");
- vfModule.setModuleIndex(vfModuleIndex);
- ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
- modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
- modelInfoVfModule.setModelName("vfModuleModelName");
- modelInfoVfModule.setModelVersion("vfModuleModelVersion");
- modelInfoVfModule.setModelUUID("vfModuleModelUuid");
- modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
- vfModule.setModelInfoVfModule(modelInfoVfModule);
-
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setLcpCloudRegionId("cloudRegionId");
- cloudRegion.setTenantId("tenantId");
-
- OrchestrationContext orchestrationContext = new OrchestrationContext();
- orchestrationContext.setIsRollbackEnabled(false);
-
- String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json")));
- String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json")));
-
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
- requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
-
-
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestWithCloudResources.json")));
-
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
- jsonToCompare,
- CreateVfModuleRequest.class);
-
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
- }
-
- @Test
- @Ignore
- public void createVfModuleRequestMapperDhcpDisabledTest() throws Exception {
- // prepare and set service instance
- ServiceInstance serviceInstance = new ServiceInstance();
- serviceInstance.setServiceInstanceId("serviceInstanceId");
- ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
- modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
- modelInfoServiceInstance.setModelName("serviceModelName");
- modelInfoServiceInstance.setModelUuid("serviceModelUuid");
- modelInfoServiceInstance.setModelVersion("serviceModelVersion");
- modelInfoServiceInstance.setEnvironmentContext("environmentContext");
- modelInfoServiceInstance.setWorkloadContext("workloadContext");
- serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
-
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
-
-
- RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
- requestContext.setMsoRequestId("requestId");
- requestContext.setUserParams(userParams);
- requestContext.setProductFamilyId("productFamilyId");
-
- GenericVnf vnf = new GenericVnf();
- vnf.setVnfId("vnfId");
- vnf.setVnfType("vnfType");
- vnf.setVnfName("vnfName");
- ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
- modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
- modelInfoGenericVnf.setModelName("vnfModelName");
- modelInfoGenericVnf.setModelVersion("vnfModelVersion");
- modelInfoGenericVnf.setModelUuid("vnfModelUuid");
- modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
- vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
-
- Integer vfModuleIndex = 1;
- VfModule vfModule = new VfModule();
- vfModule.setVfModuleId("vfModuleId");
- vfModule.setVfModuleName("vfModuleName");
- vfModule.setModuleIndex(vfModuleIndex);
- ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
- modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
- modelInfoVfModule.setModelName("vfModuleModelName");
- modelInfoVfModule.setModelVersion("vfModuleModelVersion");
- modelInfoVfModule.setModelUUID("vfModuleModelUuid");
- modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
- vfModule.setModelInfoVfModule(modelInfoVfModule);
-
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setLcpCloudRegionId("cloudRegionId");
- cloudRegion.setTenantId("tenantId");
-
- OrchestrationContext orchestrationContext = new OrchestrationContext();
- orchestrationContext.setIsRollbackEnabled(false);
-
- String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json")));
- String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
-
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
- requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
-
-
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestDhcpDisabled.json")));
-
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
- jsonToCompare,
- CreateVfModuleRequest.class);
-
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
- }
-
- @Test
- @Ignore
- public void createVfModuleRequestMapperMultipleDhcpTest() throws Exception {
- // prepare and set service instance
- ServiceInstance serviceInstance = new ServiceInstance();
- serviceInstance.setServiceInstanceId("serviceInstanceId");
- ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
- modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
- modelInfoServiceInstance.setModelName("serviceModelName");
- modelInfoServiceInstance.setModelUuid("serviceModelUuid");
- modelInfoServiceInstance.setModelVersion("serviceModelVersion");
- modelInfoServiceInstance.setEnvironmentContext("environmentContext");
- modelInfoServiceInstance.setWorkloadContext("workloadContext");
- serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
-
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
-
- RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
- requestContext.setMsoRequestId("requestId");
- requestContext.setUserParams(userParams);
- requestContext.setProductFamilyId("productFamilyId");
-
- GenericVnf vnf = new GenericVnf();
- vnf.setVnfId("vnfId");
- vnf.setVnfType("vnfType");
- vnf.setVnfName("vnfName");
- ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
- modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
- modelInfoGenericVnf.setModelName("vnfModelName");
- modelInfoGenericVnf.setModelVersion("vnfModelVersion");
- modelInfoGenericVnf.setModelUuid("vnfModelUuid");
- modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
- vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
-
- Integer vfModuleIndex = 1;
- VfModule vfModule = new VfModule();
- vfModule.setVfModuleId("vfModuleId");
- vfModule.setVfModuleName("vfModuleName");
- vfModule.setModuleIndex(vfModuleIndex);
- ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
- modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
- modelInfoVfModule.setModelName("vfModuleModelName");
- modelInfoVfModule.setModelVersion("vfModuleModelVersion");
- modelInfoVfModule.setModelUUID("vfModuleModelUuid");
- modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
- vfModule.setModelInfoVfModule(modelInfoVfModule);
-
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setLcpCloudRegionId("cloudRegionId");
- cloudRegion.setTenantId("tenantId");
-
- OrchestrationContext orchestrationContext = new OrchestrationContext();
- orchestrationContext.setIsRollbackEnabled(false);
-
- String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json")));
- String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
-
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- CreateVfModuleRequest vfModuleVNFAdapterRequest = mapper.createVfModuleRequestMapper(
- requestContext, cloudRegion, orchestrationContext, serviceInstance,
- vnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
-
-
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestMultipleDhcp.json")));
-
- ObjectMapper omapper = new ObjectMapper();
- CreateVfModuleRequest reqMapper1 = omapper.readValue(
- jsonToCompare,
- CreateVfModuleRequest.class);
-
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
- }
-
- @Test
- public void DeleteVfModuleRequestMapperTest() throws Exception {
- ServiceInstance serviceInstance = new ServiceInstance();
- serviceInstance.setServiceInstanceId("serviceInstanceId");
- ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
- modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
- modelInfoServiceInstance.setModelName("serviceModelName");
- modelInfoServiceInstance.setModelUuid("serviceModelUuid");
- modelInfoServiceInstance.setModelVersion("serviceModelVersion");
- modelInfoServiceInstance.setEnvironmentContext("environmentContext");
- modelInfoServiceInstance.setWorkloadContext("workloadContext");
- serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
- // prepare Customer object
- Customer customer = new Customer();
- customer.setGlobalCustomerId("globalCustomerId");
- customer.setServiceSubscription(new ServiceSubscription());
- // set Customer on service instance
- customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
- //
- RequestContext requestContext = new RequestContext();
- HashMap<String, String> userParams = new HashMap<String, String>();
- userParams.put("key1", "value1");
- requestContext.setMsoRequestId("requestId");
- requestContext.setUserParams(userParams);
- requestContext.setProductFamilyId("productFamilyId");
-
- GenericVnf vnf = new GenericVnf();
- vnf.setVnfId("vnfId");
- vnf.setVnfType("vnfType");
- vnf.setVnfName("vnfName");
- ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
- modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
- modelInfoGenericVnf.setModelName("vnfModelName");
- modelInfoGenericVnf.setModelVersion("vnfModelVersion");
- modelInfoGenericVnf.setModelUuid("vnfModelUuid");
- modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
- vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
-
- VfModule vfModule = new VfModule();
- vfModule.setVfModuleId("vfModuleId");
- vfModule.setVfModuleName("vfModuleName");
- ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
- modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
- modelInfoVfModule.setModelName("vfModuleModelName");
- modelInfoVfModule.setModelVersion("vfModuleModelVersion");
- modelInfoVfModule.setModelUUID("vfModuleModelUuid");
- modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
- vfModule.setModelInfoVfModule(modelInfoVfModule);
-
- CloudRegion cloudRegion = new CloudRegion();
- cloudRegion.setLcpCloudRegionId("cloudRegionId");
- cloudRegion.setTenantId("tenantId");
-
- OrchestrationContext orchestrationContext = new OrchestrationContext();
- orchestrationContext.setIsRollbackEnabled(false);
-
- VnfAdapterVfModuleObjectMapper mapper = new VnfAdapterVfModuleObjectMapper();
- mapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
-
- DeleteVfModuleRequest vfModuleVNFAdapterRequest = mapper.deleteVfModuleRequestMapper(
- requestContext, cloudRegion, serviceInstance,
- vnf, vfModule);
-
-
- String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterDeleteVfModuleRequest.json")));
-
- ObjectMapper omapper = new ObjectMapper();
- DeleteVfModuleRequest reqMapper1 = omapper.readValue(
- jsonToCompare,
- DeleteVfModuleRequest.class);
-
- assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
- }
-}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
new file mode 100644
index 0000000000..0c9e281fc7
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java
@@ -0,0 +1,773 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.client.adapter.vnf.mapper;
+
+import static com.shazam.shazamcrest.MatcherAssert.assertThat;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
+import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
+import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class VnfAdapterVfModuleObjectMapperPayloadTest {
+
+ private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/";
+
+ private VnfAdapterVfModuleObjectMapper vfModuleObjectMapper = new VnfAdapterVfModuleObjectMapper();
+ private ObjectMapper omapper = new ObjectMapper();
+ @Before
+ public void setUp() {
+ vfModuleObjectMapper.vnfAdapterObjectMapperUtils = new VnfAdapterObjectMapperUtils();
+ vfModuleObjectMapper.init();
+
+ }
+ @Test
+ public void createVfModuleRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+ HashMap<String, String> cloudParams = new HashMap<String, String>();
+ cloudParams.put("key3", "value3");
+ vfModule.setCloudParams(cloudParams);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestWithNoEnvironmentAndWorkloadContextMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext(null);
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleAddonRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ //
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ VfModule baseVfModule = new VfModule();
+ baseVfModule.setVfModuleId("baseVfModuleId");
+ baseVfModule.setHeatStackId("baseVfModuleStackId");
+ ModelInfoVfModule baseModelInfoVfModule = new ModelInfoVfModule();
+ baseModelInfoVfModule.setIsBaseBoolean(true);
+ baseVfModule.setModelInfoVfModule(baseModelInfoVfModule);
+ vnf.getVfModules().add(baseVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleAddonRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleWithVolumeGroupRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ //
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ VolumeGroup volumeGroup = new VolumeGroup();
+ volumeGroup.setVolumeGroupId("volumeGroupId");
+ volumeGroup.setHeatStackId("volumeGroupStackId");
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleWithVolumeGroupRequest.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleWithSingleAvailabilityZoneRequestMapperTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value2");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestMapperWithCloudResourcesTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value1");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestWithCloudResources.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestMapperDhcpDisabledTest() throws Exception {
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value1");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestDhcpDisabled.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestMapperMultipleDhcpTest() throws Exception {
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value1");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestMultipleDhcp.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void createVfModuleRequestMapperWithNullUserParamsTest() throws Exception {
+
+ // prepare and set service instance
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ Integer vfModuleIndex = 1;
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ vfModule.setModuleIndex(vfModuleIndex);
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ String sdncVnfQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVnfTopology.json")));
+ String sdncVfModuleQueryResponse = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "genericResourceApiVfModuleSdncVfModuleTopology.json")));
+
+ CreateVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.createVfModuleRequestMapper(
+ requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ vnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterCreateVfModuleRequestNoUserParams.json")));
+
+ CreateVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ CreateVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+
+ @Test
+ public void DeleteVfModuleRequestMapperTest() throws Exception {
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId("serviceInstanceId");
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid");
+ modelInfoServiceInstance.setModelName("serviceModelName");
+ modelInfoServiceInstance.setModelUuid("serviceModelUuid");
+ modelInfoServiceInstance.setModelVersion("serviceModelVersion");
+ modelInfoServiceInstance.setEnvironmentContext("environmentContext");
+ modelInfoServiceInstance.setWorkloadContext("workloadContext");
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+
+ RequestContext requestContext = new RequestContext();
+ HashMap<String, String> userParams = new HashMap<String, String>();
+ userParams.put("key1", "value1");
+ requestContext.setMsoRequestId("requestId");
+ requestContext.setUserParams(userParams);
+ requestContext.setProductFamilyId("productFamilyId");
+
+ GenericVnf vnf = new GenericVnf();
+ vnf.setVnfId("vnfId");
+ vnf.setVnfType("vnfType");
+ vnf.setVnfName("vnfName");
+ ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+ modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid");
+ modelInfoGenericVnf.setModelName("vnfModelName");
+ modelInfoGenericVnf.setModelVersion("vnfModelVersion");
+ modelInfoGenericVnf.setModelUuid("vnfModelUuid");
+ modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid");
+ vnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+
+ VfModule vfModule = new VfModule();
+ vfModule.setVfModuleId("vfModuleId");
+ vfModule.setVfModuleName("vfModuleName");
+ ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule();
+ modelInfoVfModule.setModelInvariantUUID("vfModuleModelInvariantUuid");
+ modelInfoVfModule.setModelName("vfModuleModelName");
+ modelInfoVfModule.setModelVersion("vfModuleModelVersion");
+ modelInfoVfModule.setModelUUID("vfModuleModelUuid");
+ modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
+ vfModule.setModelInfoVfModule(modelInfoVfModule);
+
+ CloudRegion cloudRegion = new CloudRegion();
+ cloudRegion.setLcpCloudRegionId("cloudRegionId");
+ cloudRegion.setTenantId("tenantId");
+
+ OrchestrationContext orchestrationContext = new OrchestrationContext();
+ orchestrationContext.setIsRollbackEnabled(false);
+
+ DeleteVfModuleRequest vfModuleVNFAdapterRequest = vfModuleObjectMapper.deleteVfModuleRequestMapper(
+ requestContext, cloudRegion, serviceInstance,
+ vnf, vfModule);
+
+
+ String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "vnfAdapterDeleteVfModuleRequest.json")));
+
+ DeleteVfModuleRequest reqMapper1 = omapper.readValue(
+ jsonToCompare,
+ DeleteVfModuleRequest.class);
+
+ assertThat(vfModuleVNFAdapterRequest, sameBeanAs(reqMapper1).ignoring("messageId").ignoring("notificationUrl"));
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
index 0c4c8fc443..477be816aa 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVfModuleResourcesTest.java
@@ -124,4 +124,17 @@ public class AAIVfModuleResourcesTest extends TestDataSetup{
aaiVfModuleResources.connectVfModuleToVolumeGroup(vnf, vfModule, volumeGroup, cloudRegion);
verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
}
+
+ @Test
+ public void updateHeatStackIdVfModuleTest() throws Exception {
+ vfModule.setHeatStackId("testHeatStackId");
+
+ doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.VfModule.class));
+
+ aaiVfModuleResources.updateHeatStackIdVfModule(vfModule, vnf);
+
+ verify(MOCK_aaiResourcesClient, times(1)).update(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.VfModule.class));
+
+ assertEquals("testHeatStackId", vfModule.getHeatStackId());
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
index de15e0a550..f60f29fa34 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVolumeGroupResourcesTest.java
@@ -129,4 +129,17 @@ public class AAIVolumeGroupResourcesTest extends TestDataSetup{
verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class));
}
+
+ @Test
+ public void updateHeatStackIdVolumeGroupTest() throws Exception {
+ volumeGroup.setHeatStackId("testVolumeHeatStackId");
+
+ doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.VolumeGroup.class));
+
+ aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion);
+
+ verify(MOCK_aaiResourcesClient, times(1)).update(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.VolumeGroup.class));
+
+ assertEquals("testVolumeHeatStackId", volumeGroup.getHeatStackId());
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
index dfed3c8929..f7c12104cc 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVfModuleResourcesTest.java
@@ -33,13 +33,14 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
-import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
+import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
@@ -59,6 +60,7 @@ public class VnfAdapterVfModuleResourcesTest extends TestDataSetup{
private ModelInfoServiceInstance modelInfoServiceInstance;
private GenericVnf genericVnf;
private VfModule vfModule;
+ private VolumeGroup volumeGroup;
private ModelInfoVfModule modelInfoVfModule;
private CloudRegion cloudRegion;
private OrchestrationContext orchestrationContext;
@@ -95,13 +97,30 @@ public class VnfAdapterVfModuleResourcesTest extends TestDataSetup{
@Test
public void test_createVfModule() throws Exception {
doReturn(createVfModuleRequest).when(MOCK_vnfAdapterVfModuleObjectMapper).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ CreateVfModuleRequest actualCreateVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ verify(MOCK_vnfAdapterVfModuleObjectMapper, times(1)).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, null, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+
+ assertNotNull(createVfModuleRequest);
+ assertNotNull(actualCreateVfModuleRequest);
+ assertEquals(createVfModuleRequest, actualCreateVfModuleRequest);
+ }
+
+ @Test
+ public void test_createVfModuleWithVolumeGroup() throws Exception {
+ volumeGroup = buildVolumeGroup();
+ doReturn(createVfModuleRequest).when(MOCK_vnfAdapterVfModuleObjectMapper).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
CreateVfModuleRequest actualCreateVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
verify(MOCK_vnfAdapterVfModuleObjectMapper, times(1)).createVfModuleRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance,
- genericVnf, vfModule, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
+ genericVnf, vfModule, volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse);
assertNotNull(createVfModuleRequest);
assertNotNull(actualCreateVfModuleRequest);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java
new file mode 100644
index 0000000000..a564d8a21d
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java
@@ -0,0 +1,50 @@
+package org.onap.so.client.sdnc;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import java.util.Map;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.springframework.core.ParameterizedTypeReference;
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+import wiremock.org.apache.http.entity.ContentType;
+public class BaseClientTest {
+
+
+ @Rule
+ public WireMockRule wm = new WireMockRule(options().dynamicPort());
+
+ @Test
+ public void verifyString() {
+ BaseClient<String, String> client = new BaseClient<>();
+ String response = "{\"hello\" : \"world\"}";
+ client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString());
+ wm.stubFor(get(urlEqualTo("/test"))
+ .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString())));
+
+ String result = client.get("", new ParameterizedTypeReference<String>() {});
+ assertThat(result, equalTo(response));
+ }
+
+ @Test
+ public void verifyMap() {
+ BaseClient<String, Map<String, Object>> client = new BaseClient<>();
+ String response = "{\"hello\" : \"world\"}";
+ client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString());
+ wm.stubFor(get(urlEqualTo("/test"))
+ .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString())));
+
+ Map<String, Object> result = client.get("", new ParameterizedTypeReference<Map<String, Object>>() {});
+ assertThat("world", equalTo(result.get("hello")));
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
index 369a7321e2..b3999a788c 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java
@@ -100,6 +100,9 @@ public class VfModuleTopologyOperationRequestMapperTest {
modelInfoVfModule.setModelUUID("vfModuleModelUuid");
modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid");
vfModule.setModelInfoVfModule(modelInfoVfModule);
+ HashMap<String, String> cloudParams = new HashMap<String, String>();
+ userParams.put("key2", "value2");
+ vfModule.setCloudParams(cloudParams);
VolumeGroup volumeGroup = new VolumeGroup();
volumeGroup.setVolumeGroupId("volumeGroupId");
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json
new file mode 100644
index 0000000000..a24f8bf125
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json
@@ -0,0 +1,178 @@
+{
+ "vf-module-assignments": {
+ "vms": {
+ "vm": [
+ {
+ "vm-type": "vmType0",
+ "vm-names": {
+ "vm-name": [
+ "vmName0",
+ "vmName1"
+ ],
+ "vnfc-names": [
+ {
+ "vnfc-name": "vnfcName0",
+ "vnfc-networks": {
+ "vnfc-network-data": [
+ {
+ "vnfc-network-role": "vnfcNetworkRole0",
+ "vnfc-type": "fw",
+ "vnfc-ports": {
+ "vnfc-port": [
+ {
+ "vnfc-port-id": "01",
+ "common-sub-interface-role": "ctrl",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "network-id": "networkId0",
+ "network-name": 1,
+ "vlan-tag-id": 1,
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-version": "ipv4",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ },
+ {
+ "ip-version": "ipv6",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ }
+ ]
+ },
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+ {
+ "network-role": "vmNetworkRole0",
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+ "interfaceRoutePrefix0",
+ "interfaceRoutePrefix1"
+ ]
+ },
+ "sriov-parameters": {
+ "heat-vlan-filters": {
+ "heat-vlan-filter": [
+ "heatVlanFilter0",
+ "heatVlanFilter1"
+ ]
+ }
+ },
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ },
+ "ip-version": "ipv4"
+ },
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip2",
+ "ip3"
+ ]
+ },
+ "ip-version": "ipv6"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "paramOne",
+ "value": "paramOneValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramTwo",
+ "value": "paramTwoValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramThree",
+ "value": "paramThreeValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
new file mode 100644
index 0000000000..eaedb92281
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
@@ -0,0 +1,179 @@
+{
+ "vf-module-assignments": {
+ "vms": {
+ "vm": [
+ {
+ "vm-type": "vmType0",
+ "vm-names": {
+ "vm-name": [
+ "vmName0",
+ "vmName1"
+ ],
+ "vnfc-names": [
+ {
+ "vnfc-name": "vnfcName0",
+ "vnfc-networks": {
+ "vnfc-network-data": [
+ {
+ "vnfc-network-role": "vnfcNetworkRole0",
+ "vnfc-type": "fw",
+ "vnfc-ports": {
+ "vnfc-port": [
+ {
+ "vnfc-port-id": "01",
+ "common-sub-interface-role": "ctrl",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "network-id": "networkId0",
+ "network-name": 1,
+ "vlan-tag-id": 1,
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-version": "ipv4",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ },
+ {
+ "ip-version": "ipv6",
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ }
+ }
+ ]
+ },
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+ {
+ "network-role": "vmNetworkRole0",
+ "floating-ips": {
+ "floating-ip-v4": [
+ "floatingIpV40",
+ "floatingIpV41"
+ ],
+ "floating-ip-v6": [
+ "floatingIpV60",
+ "floatingIpV61"
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+ "interfaceRoutePrefix0",
+ "interfaceRoutePrefix1"
+ ]
+ },
+ "sriov-parameters": {
+ "heat-vlan-filters": {
+ "heat-vlan-filter": [
+ "heatVlanFilter0",
+ "heatVlanFilter1"
+ ]
+ }
+ },
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip0",
+ "ip1"
+ ]
+ },
+ "ip-version": "ipv4"
+ },
+ {
+ "network-ips": {
+ "network-ip": [
+ "ip2",
+ "ip3"
+ ]
+ },
+ "ip-version": "ipv6"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "paramOne",
+ "value": "paramOneValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramTwo",
+ "value": "paramTwoValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ },
+ {
+ "name": "paramThree",
+ "value": "paramThreeValue",
+ "resource-resolution-data": {
+ "resource-key": [
+ {
+ "name": "resourceKeyName",
+ "value": "resourceKeyValue"
+ }
+ ],
+ "status": "status",
+ "capability-name": "capabilityName"
+ }
+ }
+ ]
+ },
+ "sdnc-generated-cloud-resources": "true"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json
new file mode 100644
index 0000000000..39c6708631
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json
@@ -0,0 +1,48 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
new file mode 100644
index 0000000000..21ba0876f5
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
@@ -0,0 +1,48 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "N"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "N"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
new file mode 100644
index 0000000000..5062a06117
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
@@ -0,0 +1,68 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId2",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId3",
+ "dhcp-enabled": "N"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId4",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId5",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
new file mode 100644
index 0000000000..fedee49609
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
@@ -0,0 +1,47 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "zone0",
+ "zone1",
+ "zone2"
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": "",
+ "sdnc-generated-cloud-resources": "true"
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json
new file mode 100644
index 0000000000..a6964a323f
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json
@@ -0,0 +1,44 @@
+{
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": "zone0"
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "network-role": "vnfNetworkRole0",
+ "neutron-id": "neutronId0",
+ "network-name": "netName0",
+ "contrail-network-fqdn": "netFqdnValue0",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "ip-version": "ipv4",
+ "subnet-id": "subnetId0",
+ "dhcp-enabled": "Y"
+ },
+ {
+ "ip-version": "ipv6",
+ "subnet-id": "subnetId1",
+ "dhcp-enabled": "Y"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+ {
+ "name": "key1",
+ "value": "value1"
+ }
+ ]
+ },
+ "aic-clli": "",
+ "tenant": "",
+ "vnf-topology-identifier-structure": {},
+ "onap-model-information": {},
+ "aic-cloud-region": ""
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
new file mode 100644
index 0000000000..c4e7237511
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleAddonRequest.json
@@ -0,0 +1,69 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "baseVfModuleId": "baseVfModuleId",
+ "baseVfModuleStackId": "baseVfModuleStackId",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
index a30ee59d5c..0132068fe4 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
@@ -37,7 +38,8 @@
"fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
"fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
"workload_context": "workloadContext",
- "key1": "value1",
+ "key1": "value2",
+ "key3": "value3",
"availability_zone_0": "zone0",
"availability_zone_1": "zone1",
"availability_zone_2": "zone2",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
index 49a68b909a..90326e33eb 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestDhcpDisabled.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
index a862051582..2f943a67bc 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestMultipleDhcp.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
new file mode 100644
index 0000000000..4c50ad1187
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestNoUserParams.json
@@ -0,0 +1,67 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value1",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
index 9c77f14f4b..d80c739916 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterCreateVfModuleRequestWithCloudResources.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithCloudResources.json
@@ -1,6 +1,7 @@
{
"cloudSiteId": "cloudRegionId",
"tenantId": "tenantId",
+ "vnfId": "vnfId",
"vnfType": "vnfType",
"vfModuleId": "vfModuleId",
"vfModuleName": "vfModuleName",
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
new file mode 100644
index 0000000000..293c6c21ed
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequestWithSingleAvailabilityZone.json
@@ -0,0 +1,65 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
new file mode 100644
index 0000000000..fd3b0a3d58
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithNoEnvironmentAndWorkloadContextRequest.json
@@ -0,0 +1,67 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
new file mode 100644
index 0000000000..dff1ccf7b0
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleWithVolumeGroupRequest.json
@@ -0,0 +1,69 @@
+{
+ "cloudSiteId": "cloudRegionId",
+ "tenantId": "tenantId",
+ "vnfId": "vnfId",
+ "vnfType": "vnfType",
+ "vfModuleId": "vfModuleId",
+ "vfModuleName": "vfModuleName",
+ "vfModuleType": "vfModuleModelName",
+ "vnfVersion": "serviceModelVersion",
+ "modelCustomizationUuid": "vfModuleModelCustomizationUuid",
+ "volumeGroupId": "volumeGroupId",
+ "volumeGroupStackId": "volumeGroupStackId",
+ "skipAAI": true,
+ "backout": false,
+ "failIfExists": true,
+ "msoRequest":
+ {
+ "requestId": "requestId",
+ "serviceInstanceId": "serviceInstanceId"
+ },
+
+ "vfModuleParams":
+ {
+ "vnf_id": "vnfId",
+ "vnf_name": "vnfName",
+ "vf_module_id": "vfModuleId",
+ "vf_module_index": "1",
+ "vf_module_name": "vfModuleName",
+ "environment_context": "environmentContext",
+ "fw_0_subint_ctrl_port_0_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_net_ids": "networkId0",
+ "fw_0_subint_ctrl_port_0_net_names": "1",
+ "fw_subint_ctrl_port_0_subintcount": "1",
+ "fw_0_subint_ctrl_port_0_v6_ip": "ip0,ip1",
+ "fw_0_subint_ctrl_port_0_v6_ip_0": "ip0",
+ "fw_0_subint_ctrl_port_0_v6_ip_1": "ip1",
+ "fw_0_subint_ctrl_port_0_vlan_ids": "1",
+ "fw_subint_ctrl_port_0_floating_ip": "floatingIpV40",
+ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60",
+ "workload_context": "workloadContext",
+ "key1": "value2",
+ "availability_zone_0": "zone0",
+ "availability_zone_1": "zone1",
+ "availability_zone_2": "zone2",
+ "vnfNetworkRole0_net_fqdn": "netFqdnValue0",
+ "vnfNetworkRole0_net_id": "neutronId0",
+ "vnfNetworkRole0_net_name": "netName0",
+ "vnfNetworkRole0_subnet_id": "subnetId0",
+ "vnfNetworkRole0_v6_subnet_id": "subnetId1",
+ "vmType0_name_0": "vmName0",
+ "vmType0_name_1": "vmName1",
+ "vmType0_names": "vmName0,vmName1",
+ "vmType0_vmNetworkRole0_floating_ip": "floatingIpV40",
+ "vmType0_vmNetworkRole0_floating_v6_ip": "floatingIpV60",
+ "vmType0_vmNetworkRole0_route_prefixes": "[{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix0\"},{\"interface_route_table_routes_route_prefix\": \"interfaceRoutePrefix1\"}]",
+ "vmNetworkRole0_ATT_VF_VLAN_FILTER": "heatVlanFilter0,heatVlanFilter1",
+ "vmType0_vmNetworkRole0_ip_0": "ip0",
+ "vmType0_vmNetworkRole0_ip_1": "ip1",
+ "vmType0_vmNetworkRole0_ips": "ip0,ip1",
+ "vmType0_vmNetworkRole0_v6_ip_0": "ip2",
+ "vmType0_vmNetworkRole0_v6_ip_1": "ip3",
+ "vmType0_vmNetworkRole0_v6_ips": "ip2,ip3",
+ "paramOne": "paramOneValue",
+ "paramTwo": "paramTwoValue",
+ "paramThree": "paramThreeValue"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json
index 21e5bde3ec..21e5bde3ec 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/vnfAdapterDeleteVfModuleRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterDeleteVfModuleRequest.json
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json
index 4231152d86..50d5642fee 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json
@@ -23,6 +23,10 @@
"value" : "value1"
},
{
+ "name" : "key2",
+ "value" : "value2"
+ },
+ {
"name" : "volume-group-id",
"value" : "volumeGroupId"
} ]
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json
deleted file mode 100644
index 1497286a1b..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopology.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "vf-module-assignments":
- {
- "vms":
- {
- "vm":
- [
- {
- "vm-type": "vmType0",
- "vm-names":
- {
- "vm-name":
- [
- "vmName0",
- "vmName1"
- ],
-
- "vnfc-names":
- [
- {
- "vnfc-name": "vnfcName0",
- "vnfc-networks":
- {
- "vnfc-network-data":
- [
- {
- "vnfc-network-role": "vnfcNetworkRole0",
- "vnfc-type": "fw",
- "vnfc-ports":
- {
- "vnfc-port":
- [
- {
- "vnfc-port-id": "01",
- "common-sub-interface-role": "ctrl",
- "vnic-sub-interfaces":
- {
- "sub-interface-network-data":
- [
- {
- "network-id": "networkId0",
- "network-name": 1,
- "vlan-tag-id": 1,
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "ip-version": "ipv4",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- },
-
- {
- "ip-version": "ipv6",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- }
- ]
- },
-
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- },
-
- "vm-networks":
- {
- "vm-network":
- [
- {
- "network-role": "vmNetworkRole0",
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- },
-
- "interface-route-prefixes":
- {
- "interface-route-prefix":
- [
- "interfaceRoutePrefix0",
- "interfaceRoutePrefix1"
- ]
- },
-
- "sriov-parameters":
- {
- "heat-vlan-filters":
- {
- "heat-vlan-filter":
- [
- "heatVlanFilter0",
- "heatVlanFilter1"
- ]
- }
- },
-
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- },
-
- "ip-version": "ipv4"
- },
-
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip2",
- "ip3"
- ]
- },
-
- "ip-version": "ipv6"
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
-
- "vf-module-parameters":
- {
- "param":
- [
- {
- "name": "paramOne",
- "value": "paramOneValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramTwo",
- "value": "paramTwoValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramThree",
- "value": "paramThreeValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- }
- ]
- }
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
deleted file mode 100644
index 2a8acb927e..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json
+++ /dev/null
@@ -1,243 +0,0 @@
-{
- "vf-module-assignments":
- {
- "vms":
- {
- "vm":
- [
- {
- "vm-type": "vmType0",
- "vm-names":
- {
- "vm-name":
- [
- "vmName0",
- "vmName1"
- ],
-
- "vnfc-names":
- [
- {
- "vnfc-name": "vnfcName0",
- "vnfc-networks":
- {
- "vnfc-network-data":
- [
- {
- "vnfc-network-role": "vnfcNetworkRole0",
- "vnfc-type": "fw",
- "vnfc-ports":
- {
- "vnfc-port":
- [
- {
- "vnfc-port-id": "01",
- "common-sub-interface-role": "ctrl",
- "vnic-sub-interfaces":
- {
- "sub-interface-network-data":
- [
- {
- "network-id": "networkId0",
- "network-name": 1,
- "vlan-tag-id": 1,
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "ip-version": "ipv4",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- },
-
- {
- "ip-version": "ipv6",
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- }
- }
- ]
- },
-
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- },
-
- "vm-networks":
- {
- "vm-network":
- [
- {
- "network-role": "vmNetworkRole0",
- "floating-ips":
- {
- "floating-ip-v4":
- [
- "floatingIpV40",
- "floatingIpV41"
- ],
-
- "floating-ip-v6":
- [
- "floatingIpV60",
- "floatingIpV61"
- ]
- },
-
- "interface-route-prefixes":
- {
- "interface-route-prefix":
- [
- "interfaceRoutePrefix0",
- "interfaceRoutePrefix1"
- ]
- },
-
- "sriov-parameters":
- {
- "heat-vlan-filters":
- {
- "heat-vlan-filter":
- [
- "heatVlanFilter0",
- "heatVlanFilter1"
- ]
- }
- },
-
- "network-information-items":
- {
- "network-information-item":
- [
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip0",
- "ip1"
- ]
- },
-
- "ip-version": "ipv4"
- },
-
- {
- "network-ips":
- {
- "network-ip":
- [
- "ip2",
- "ip3"
- ]
- },
-
- "ip-version": "ipv6"
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
-
- "vf-module-parameters":
- {
- "param":
- [
- {
- "name": "paramOne",
- "value": "paramOneValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramTwo",
- "value": "paramTwoValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- },
-
- {
- "name": "paramThree",
- "value": "paramThreeValue",
- "resource-resolution-data":
- {
- "resource-key":
- [
- {
- "name": "resourceKeyName",
- "value": "resourceKeyValue"
- }
- ],
-
- "status": "status",
- "capability-name": "capabilityName"
- }
- }
- ]
- },
-
- "sdnc-generated-cloud-resources": "true"
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json
deleted file mode 100644
index 2c7728397f..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopology.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "Y"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
deleted file mode 100644
index a302777810..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "N"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "N"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
deleted file mode 100644
index 67c095a217..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId1",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId2",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId3",
- "dhcp-enabled" : "N"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId4",
- "dhcp-enabled" : "Y"
- },
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId5",
- "dhcp-enabled" : "Y"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": ""
-} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
deleted file mode 100644
index 0047764713..0000000000
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "vnf-resource-assignments":
- {
- "availability-zones":
- {
- "availability-zone":
- [
- "zone0",
- "zone1",
- "zone2"
- ]
- },
-
- "vnf-networks":
- {
- "vnf-network":
- [
- {
- "network-role": "vnfNetworkRole0",
- "neutron-id": "neutronId0",
- "network-name": "netName0",
- "contrail-network-fqdn": "netFqdnValue0",
- "subnets-data":
- {
- "subnet-data":
- [
- {
- "ip-version": "ipv4",
- "subnet-id": "subnetId0"
- },
-
- {
- "ip-version": "ipv6",
- "subnet-id": "subnetId1"
- }
- ]
- }
- }
- ]
- }
- },
-
- "vnf-parameters-data":
- {
- "param":
- [
- {
- "name": "key1",
- "value": "value1"
- }
- ]
- },
-
- "aic-clli": "",
- "tenant": "",
- "vnf-topology-identifier-structure":
- {
-
- },
-
- "onap-model-information":
- {
-
- },
-
- "aic-cloud-region": "",
-
- "sdnc-generated-cloud-resources": "true"
-} \ No newline at end of file